Lancer les script dans cet ordre.
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
const fetch = require('node-fetch') | |
const fullUrl = 'https://bayfiles.com/W6Z6ceh8bf/rengekawai_jpg' | |
async function getUrl() { | |
const res = await fetch(fullUrl) | |
const text = await res.text() | |
const [, url] = /<a href="(https:\/\/cdn-\d{2}.+)">/.exec(text) | |
return url |
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
const ffmpeg = require('fluent-ffmpeg') | |
const fetch = require('node-fetch') | |
const FormData = require('form-data') | |
const { PassThrough } = require('stream') | |
const apiUrl = 'https://bayfiles.com/api/upload' | |
const idreg = /^(https?:\/\/[^\/]+)\/([0-9A-Za-z_-]+)/ | |
const namereg = /([^\/]+)$/ |
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
import SimpleHTTPServer | |
import SocketServer | |
PORT = 8000 | |
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
pass | |
Handler.extensions_map['.wasm'] = 'application/wasm' |
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 | |
emcc *.c\ | |
-O2\ | |
-s WASM=1\ | |
-s USE_SDL=2\ | |
-s USE_SDL_IMAGE=2\ | |
-s USE_SDL_NET=2\ | |
-s ALLOW_MEMORY_GROWTH=1\ | |
--use-preload-plugins\ | |
--preload-file resource\ |
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
const httpFetch = require('node-fetch') | |
const { JSDOM } = require('jsdom') | |
const express = require('express') | |
const morgan = require('morgan') | |
const NodeCache = require('node-cache') | |
const { Feed } = require('feed') | |
const { | |
PORT = 8080 | |
} = process.env |
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
const httpFetch = require('node-fetch') | |
const { JSDOM } = require('jsdom') | |
const express = require('express') | |
const morgan = require('morgan') | |
const { Feed } = require('feed') | |
const xmlEscape = require('xml-escape') | |
const wait = t => new Promise(r => setTimeout(r, t)) | |
const { |
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
(() => { | |
const insertScript = src => { | |
const elem = document.createElement('script') | |
elem.src = src | |
document.head.append(elem) | |
} | |
const proxy = (original, proxyFn) => function (...args) { | |
try { |
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/bash | |
URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh | |
INSTALL_SCRIPT=/tmp/Miniconda3-latest-MacOSX-x86_64.sh | |
INSTALL_DIR=/goinfre/anaconda3 | |
function remove_python { | |
rm -rf $INSTALL_DIR | |
sed -i '' "/^export PATH='\/goinfre\/anaconda3\/bin:\$PATH'$/d" ~/.zshrc | |
echo "Python has been removed." |