This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.decodeBackStanza) { | |
window.decodeBackStanza = require("WAWap").decodeStanza; | |
window.encodeBackStanza = require("WAWap").encodeStanza; | |
} | |
require("WAWap").decodeStanza = async (e, t) => { | |
const result = await window.decodeBackStanza(e, t); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
While you cannot delete the project itself yet, but you can delete the source code in your project by overwriting the glitch git repository with an empty new commit. This is very important if you just planned to play around but ended up writing important code onto glitch and have a fear of glitch.com getting hacked and your code getting compromised and published on the internet, or if you accidentally commited a private key to glitch and wanted to completely remove it. | |
on glitch website project edit page open Tools/Extras/Git,Import&Export/Write | |
Copy_link => is e.g. https://api.glitch.com/git/YOUR-PROJECT-NAME | |
Copy_user_name => is YOUR-RANDOMLY-GENERATED-GIT-USERNAME e.g. 1aaa1111-1111-aaa1-aa1111111111 | |
on glitch website project edit page open Console(terminal) | |
git config receive.denyCurrentBranch updateInstead | |
on your local computer terminal | |
mkdir foobar | |
cd foobar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon | |
```jsx | |
const MyComponent = ({ children }) => { | |
// will get fired if the page unloads while the component is mounted | |
useUnloadBeacon({ | |
url: 'https://api.my.site/route', | |
payload: () => { | |
return 'something' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convert rtsp stream to hls and write to file | |
ffmpeg -i "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -c copy -hls_time 2 -hls_wrap 10 "/var/www/html/streaming.m3u8" |