Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
main = async (url) => { | |
let el = document.createElement('div') | |
el.innerHTML = await fetch(url).then(res => res.text()) | |
const scripts = el.querySelectorAll('script') | |
const scriptCodes = await Promise.all(Array.from(scripts).filter(script => script.src).map(script => script.src).map(async url => { | |
const code = await fetch(url).then(res => res.text()).catch(e => null) | |
return code |
#!/bin/bash | |
input_file_name="$1" | |
base64_file_name="__out.b64" | |
dir="_qr" | |
mkdir -p $dir | |
max_length=${2:-1000} |
server { | |
listen 80 default_server; | |
server_name _; # some invalid name that won't match anything | |
return 444; | |
} | |
server { | |
listen 80; | |
index index.php index.html; | |
root /var/www/public; |
var main = async () => { | |
let response = await fetch("https://www.facebook.com/pages/?category=invites") | |
response = await response.text() | |
let matches = response.match(/"compat_iframe_token":"(.+?)"/gi) | |
const iframeToken = matches[0].replace(`compat_iframe_token":"`, "").replace(/\"/g, "") | |
response = await fetch(`https://www.facebook.com/pages/?category=invites&cquick=jsc_c_p&cquick_token=${iframeToken}&ctarget=https%3A%2F%2Fwww.facebook.com`) | |
response = await response.text() |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<YOUR PASSWORD>'; |
#!/bin/bash | |
openssl rand 16 > enc.key | |
printf "enc.key\nenc.key\n$(openssl rand -hex 16)" > enc.keyinfo | |
mkdir -p ./hls | |
ffmpeg -y \ | |
-i "$1" \ |
addEventListener("fetch", (event) => { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
/** | |
* Respond to the request | |
* @param {Request} request | |
* @returns {Response} | |
*/ | |
async function handleRequest(request) { |
sudo apt install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils |