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
document.querySelectorAll('#thumbnail').forEach(tn => { | |
if (tn.querySelector('.max-res-link')) { | |
return | |
} | |
const link = document.createElement('a') | |
try { | |
const maxResURL = tn.querySelector('img').src.replace(/\/[a-z]*default.jpg.*/, '/maxresdefault.jpg') | |
link.href = maxResURL |
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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
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
__npm_safeguard() { | |
python3 ~/npm_safeguard.py $1 && command "$@" | |
} | |
npm() { | |
__npm_safeguard npm "$@" | |
} | |
pnpm() { | |
__npm_safeguard pnpm "$@" | |
} | |
yarn() { |
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
let fullscreenElement; | |
Object.defineProperty(document, "fullscreenElement", { | |
get() { | |
return fullscreenElement; | |
}, | |
set(value) { | |
fullscreenElement = value; | |
}, | |
}); |
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
audd() { | |
api_token=test # get one from https://audd.io or use "test" if you don't mind the rate limits | |
source="$(pactl info | grep 'Default Sink' | cut -d":" -f2 | cut -c2-).monitor" | |
echo "Listening..." | |
ffmpeg -hide_banner -loglevel error -f pulse -i $source -t 7 -y /tmp/audd.ogg || return 1 | |
echo "Uploading..." | |
curl -s -F api_token=$api_token -F file=@/tmp/audd.ogg https://api.audd.io | jq | |
} |
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
#!/bin/bash | |
for x in \ | |
nvidia-460.67-5-x86_64.pkg.tar.zst \ | |
nvidia-dkms-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-settings-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-utils-460.67-1-x86_64.pkg.tar.zst \ | |
; do | |
test -f $x || \ |
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
#!/bin/bash | |
OUT_FILE="$(xdg-user-dir DOCUMENTS)/Домашка на $(date --iso-8601).pdf" | |
CAMERA_PATH="/run/user/1000/gvfs/sftp:host=192.168.0.2,port=1739/primary/DCIM/Camera" | |
convert -monitor -auto-orient -quality 35 -strip `ls -1tr $CAMERA_PATH/* | tail -${1:-1}` "$OUT_FILE" |
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
<script> | |
function calc(from = 0, to = Infinity) { | |
const ctx = document.querySelector("canvas").getContext("2d"); | |
ctx.font = "DejaVu Sans"; | |
results = []; | |
let i = from; | |
while (i < to) { | |
let char; | |
if (i % 0xff == 0) { | |
console.log("0x" + i.toString(16)); |
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
{ lib | |
, fetchFromGitHub | |
, rustPlatform | |
, pkg-config | |
, dbus | |
, xorg | |
, pango | |
, cairo | |
, libusb | |
, libvpx |
OlderNewer