Skip to content

Instantly share code, notes, and snippets.

@shanff
shanff / README.md
Created October 8, 2025 00:42 — forked from aleixmorgadas/README.md
Keychron VIA app Linux

Keychron VIA app Linux

Open chromium.

Go to https://usevia.app/

You might see the error:

Vid: 0x3434
@shanff
shanff / code.sh
Created May 11, 2022 03:15 — forked from tallguyjenks/code.sh
ZettelKasten Sync Code
# To permanently cache the credentials
git config --global credential.helper store
# To ignore files that could cause issues across different workspaces
touch .gitignore
echo ".obsidian/cache
.trash/
.DS_Store" > .gitignore
@shanff
shanff / fetch_raspberry_pi_firmware.sh
Created November 18, 2021 00:06 — forked from atomicstack/fetch_raspberry_pi_firmware.sh
a one-liner to fetch the latest revisions of /boot/*.{elf,dat} in the RPi firmware repository (because it's a 14GB repo and cloning takes forever, and we're only interested in ~20MB of data)
wget $( wget -qO - https://github.com/raspberrypi/firmware/tree/master/boot | perl -nE 'chomp; next unless /[.](elf|dat)/; s/.*href="([^"]+)".*/$1/; s/blob/raw/; say qq{https://github.com$_}' )
@shanff
shanff / toggle-maximize-buffer.el
Created November 9, 2020 04:12 — forked from mads-hartmann/toggle-maximize-buffer.el
An Emacs function to temporarily make one buffer fullscreen. You can quickly restore the old window setup.
(defun toggle-maximize-buffer () "Maximize buffer"
(interactive)
(if (= 1 (length (window-list)))
(jump-to-register '_)
(progn
(set-register '_ (list (current-window-configuration)))
(delete-other-windows))))
;; Bind it to a key.
@shanff
shanff / static_server.js
Last active June 19, 2018 19:58 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@shanff
shanff / 70-persistent-net.txt
Last active February 16, 2018 02:02
Rewrite UDEV for cheap Chinese USB NIC
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:53:44:58", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0", RUN="/sbin/ifconfig eth0 hw ether 00:00:00:00:00:01"