Skip to content

Instantly share code, notes, and snippets.

View saineshmamgain's full-sized avatar
🎯
Focusing

Sainesh Mamgain saineshmamgain

🎯
Focusing
View GitHub Profile
@saineshmamgain
saineshmamgain / app.js
Created May 5, 2020 04:06
Setting up laravel-websockets on production server using nginx proxy with letsencrypt ssl
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
wsHost: window.location.host,
wsPort: 80,
wssPort: 443,
disableStats: true,
enabledTransports: ['ws', 'wss'],
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
});
@saineshmamgain
saineshmamgain / Code to Copy html in javascript
Last active May 25, 2018 05:25
copy html contents to clipboard using javascript
<!DOCTYPE html>
<!--
Created using multiple answers from StackOverFlow. Will only support modern browsers.
StackOverFlow answers:
http://stackoverflow.com/a/30566157/4485147
http://stackoverflow.com/a/2044793/4485147
-->