This file contains 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 getUserMedia = async () => { | |
const model = await tfTask.ObjectDetection.CocoSsd.TFJS.load(); | |
const mediaStream = await navigator.mediaDevices.getUserMedia({ video: true }); | |
const mediaRecorder = new MediaRecorder(mediaStream); | |
mediaRecorder.ondataavailable = async (e) => { | |
const videoTracks = mediaStream.getVideoTracks(); | |
const videoTrack = videoTracks[videoTracks.length - 1]; | |
const imageCapture = new ImageCapture(videoTrack); | |
const frame = | |
await imageCapture.grabFrame(); |
This file contains 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
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem |
This file contains 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
# make "pwd" inside ssd disk folder | |
ROOT_DIR="$(pwd)" | |
TEMP_DIR="$(mktemp -d)" | |
LOCAL_TEMP_DIR="$ROOT_DIR$TEMP_DIR" | |
mkdir "$ROOT_DIR/alpine" | |
sudo ln -s "$ROOT_DIR/alpine" / | |
mkdir "$LOCAL_TEMP_DIR" -p | |
sudo ln -s "$LOCAL_TEMP_DIR" /tmp | |
wget https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.14.0/alpine-chroot-install |
This file contains 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
export const createUpdateFunction = (updateArray = (entry, index) => {}, updateObject = (entry, key) => {}) => { | |
Object.assign(Array.prototype, { | |
toString() { | |
for (const index in this) { | |
updateArray(this, index); | |
this?.[index]?.toString(); | |
} | |
} | |
}); | |
Object.assign(Object.prototype, { |
This file contains 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
alias test="fzf --preview 'bash | npx vitest --reporter='dot' {}'" |
This file contains 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
var ffff = (o,l=10) => {let k,v=o,n=0;while(n<l){for(i in v){k=i,v=v[k]}n++;console.log(k,v,n);}} | |
var ffff = (o,l=10) => {let k,v=o,n=0;while(typeof v === 'object'){for(i in v){k=i,v=v[k];}n++;console.log(v);}} |
This file contains 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
ls -r | entr cargo run |
This file contains 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
apk add gcompat | |
# apk add libc6-compat |
This file contains 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
/data/local/tmp/myexec | |
adb push executable /data/local/tmp | |
adb shell | |
cd /data/local/tmp | |
chmod 755 executable | |
./executable |
This file contains 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
# https://unofficial-builds.nodejs.org/download/release/node-vx.x.x-linux-x64-musl.tar.xz | |
rm /usr/bin/node | |
rm /usr/bin/npm | |
rm /usr/bin/npx | |
rm -r /usr/include/node | |
rm -r /usr/lib/node_modules | |
rm -r /usr/share/doc/node | |
rm /usr/share/man/man1/node.1 | |
rm /usr/share/systemtap/tapset/node.stp | |
cp -r node$1/bin/* /usr/bin |
NewerOlder