Skip to content

Instantly share code, notes, and snippets.

@jakkn
jakkn / web-course-speedup.js
Created March 4, 2024 08:46
Web course slowness begone
Array.from(document.getElementsByTagName("video")).forEach(v => v.playbackRate = 2)
@jakkn
jakkn / svg-to-avatar.sh
Created September 3, 2023 13:09
SVG to Avatar
#!/bin/bash
INPUT_FILE=$1
BG_COLOR=${2:transparent} # May be hex code or color name
if [ -z "$INPUT_FILE" ]; then
echo "Usage: $0 <input.svg> <bg-color>"
exit 1
fi
@jakkn
jakkn / mapSixaxisToXboxdrv.sh
Created February 9, 2021 19:22
retropie xboxdrv sixaxis mapping
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
--evdev /dev/input/event1 \
--silent \
--detach-kernel-driver \
--force-feedback \
--deadzone-trigger 15% \
--deadzone 4000 \
--mimic-xpad \
--dpad-as-button \
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \
# List all text in a dialogue file
yq '.EntryList.value[].Text.value."0"' emotewand.dlg.yml | less
@jakkn
jakkn / cascading_autobuilds.md
Last active February 28, 2021 21:41
Cascading autobuilds on Docker Hub
@jakkn
jakkn / nix-cheat-sheet.sh
Last active June 6, 2019 19:45
Getting started with nix
##############################################
# Useful resources:
#
# https://nixos.org/nixos/options.html
# https://nixos.wiki/wiki/NixOS:extend_NixOS
# https://nixos.wiki/wiki/Cheatsheet
#
##############################################
#### NixOS ####
@jakkn
jakkn / grab-docker-log.sh
Created March 27, 2019 09:16
curl docker log
curl --unix-socket /var/run/docker.sock http://./debug/pprof/goroutine?debug=2
@jakkn
jakkn / git-exclude-example.sh
Created April 21, 2018 10:04
git exclude tracked and untracked files
# Exclude untracked files or directories
vim .git/info/exclude
# Exclude tracked file
git update-index --assume-unchanged file
@jakkn
jakkn / gist:6bcda00ad725c7a5eb435313f0e45781
Created December 30, 2017 18:14
[Windows] show stored wifi password
netsh wlan show profiles
netsh wlan show profile name="ProfileName" key=clear
@jakkn
jakkn / port-probe.sh
Created December 30, 2017 18:12
nmap port probe
#!/bin/bash
# -sU and -sT to switch between UDP and TCP
nmap -sU -p 5121 localhost