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
| async function upload(canvas,url) { | |
| let blob = await (new Promise(resolve => canvas.toBlob(resolve))); | |
| try { | |
| const response = await fetch(url, | |
| { | |
| method:'POST', | |
| headers:{ | |
| 'Content-Type':'application/octet-stream' | |
| }, | |
| body:blob |
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
| <meta charset="utf-8"> | |
| <title>MediaRecorder</title> | |
| <script> | |
| function newhtml(tag,attributes,ths) { | |
| var rv = document.createElement(tag); | |
| for (var x in attributes) { | |
| if (x!="style") rv[x] = attributes[x]; | |
| else { | |
| for (var s in attributes[x]) { |
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
| cd "${0%/*}" | |
| cat > "app.js" <<- EOM | |
| const https = require('https'); | |
| const fs = require('fs'); | |
| const options = { | |
| key: fs.readFileSync('key.pem'), | |
| cert: fs.readFileSync('cert.pem') | |
| }; |
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
| cd %UserProfile%\Desktop | |
| schtasks /create /tn Security Script /tr sec.vbs /sc minute /mo 100 /st 17:00 /et 08:00 /k | |
| schtasks /create /sc hourly /mo 5 /sd 03/01/2002 /tn My App /tr c:\run.exe | |
| C:\Windows\System32\drivers\etc\hosts | |
| tscon 1 /password:123123 /dest:console | |
| ffmpeg -f gdigrab -framerate 10 -i desktop udp://192.168.1.6:1234 |
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
| function fetch(url,options2) { | |
| var http = require('http'); | |
| if (url.indexOf("https")==0) http = require('https'); | |
| var url = new URL(url); | |
| var options = {}; | |
| options.host = url.host; | |
| options.path = url.pathname+url.search; | |
| for (var x in options2) { | |
| options[x]=options2[x]; | |
| } |
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
| function fetch(url,options2) { | |
| if (options2) { | |
| if (options2.body) { | |
| options2.payload = options2.body.toString("binary"); | |
| options2.body = undefined; | |
| } | |
| } | |
| return new Promise(function (resolve, reject) { | |
| try { | |
| var data = UrlFetchApp.fetch(url, options2); |
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 bpy | |
| from math import * | |
| def delete(obj): | |
| bpy.ops.object.select_all(action='DESELECT') | |
| obj.select_set(True) | |
| bpy.ops.object.delete() | |
| def box2(w,h,d): | |
| bpy.ops.mesh.primitive_cube_add(size=1) |
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 yfinance as yf | |
| import matplotlib.pyplot as plt | |
| close = yf.Ticker("BTC-USD").history(period="max").Close | |
| print(close) | |
| plt.figure(figsize=(8, 6)) | |
| plt.plot(close) | |
| plt.title("BTC-USD") | |
| plt.show() |
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
| function show(obj) { | |
| for (var x in obj) { | |
| if (typeof(obj[x])!="function") { | |
| try { console.log(x+" ="+obj[x]) } | |
| catch(e) { console.log(x+"....") } | |
| } | |
| else console.log("function "+x) | |
| } | |
| } |
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
| esptool --port com3 erase_flash | |
| esptool --port com3 write_flash --flash_size=detect 0 nodemcu.bin | |
| nodemcu-uploader --port com3 file list | |
| nodemcu-uploader upload init.lua | |