Skip to content

Instantly share code, notes, and snippets.

@sprig
sprig / libsk-libfido2_BUILD_FROM_OPENSSH.md
Created August 24, 2024 09:10 — forked from thelastlin/libsk-libfido2_BUILD_FROM_OPENSSH.md
Build libsk-libfido2.so from OpenSSH-portable

Tested on macOS Sonoma Developer beta 2 (23A5276g)

Build libsk-libfido2.so

Prerequisite

  1. Download openssh-portable source code, install libcrypto, libfido2;
  2. Configure openssh-portable build system by ./configure # [options].

Apply patch

@sprig
sprig / install-gentoo-zfs-root.txt
Created September 6, 2023 21:40 — forked from hww/install-gentoo-zfs-root.txt
Install gentoo ZFS root
#
# Boot Linux Live CD with ZFS support
# fearedbliss maintains a variant of System Rescue CD that is highly recommended:
# https://wiki.gentoo.org/wiki/User:Fearedbliss
# Instruction for a USB key version
# http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
# To use ssh
# ssh -fN -R localhost:10099:localhost:22 name@server
@sprig
sprig / .block
Created February 3, 2023 10:01 — forked from mbostock/.block
DOM-to-Canvas using D3
license: gpl-3.0
@sprig
sprig / README.md
Created September 23, 2022 17:20 — forked from nrocco/README.md
Alpine Playground with libvirt

First download alpine-make-vm-image from https://github.com/alpinelinux/alpine-make-vm-image

wget https://raw.githubusercontent.com/alpinelinux/alpine-make-vm-image/v0.4.0/alpine-make-vm-image \
    && echo '5fb3270e0d665e51b908e1755b40e9c9156917c0  alpine-make-vm-image' | sha1sum -c \
    || exit 1
mv alpine-make-vm-image /usr/local/bin/
chmod +x /usr/local/bin/alpine-make-vm-image

Create a new alpine qcow2 image

@sprig
sprig / fetch_kindle.js
Created March 8, 2021 16:06 — forked from yangchenyun/fetch_kindle.js
Get back my books from Kindle
/*
* @fileoverview Program to free the content in kindle books as plain HTML.
*
* This is largely based on reverse engineering kindle cloud app
* (https://read.amazon.com) to read book data from webSQL.
*
* Access to kindle library is required to download this book.
*/
// The Kindle Compression Module copied from http://read.amazon.com application
@sprig
sprig / HowToOTG.md
Created September 21, 2020 00:02 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@sprig
sprig / hypervisor.bat
Created January 21, 2020 18:46
Toggle Hyper-V Hypervisor startup for e.g. hyper-v/wsl2 vs vmware #windows
:: ON (Windows)
bcdedit /set hypervisorlaunchtype auto
:: OFF (vmware)
@sprig
sprig / gist:9322b0bc530a87be1357462d78c63283
Created August 18, 2017 06:18 — forked from ingramchen/gist:e2af352bf8b40bb88890fba4f47eccd0
ffmpeg convert gif to mp4, for best cross browser compatibility
### Full command line options
```
ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4
```
### Notie
* output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS.
@sprig
sprig / 00-initialize-luarocks.sh
Last active December 8, 2020 19:38
Hammerspoon config
brew tap homebrew/versions
brew install lua53
## Don't remember now whether local works, possibly need to install via sudo
luarocks-5.3 install --local set
# sudo luarocks-5.3 install set
@sprig
sprig / convertBibDeskLinks.m
Created July 2, 2016 15:08 — forked from wildmichael/convertBibDeskLinks.m
Converts the Bdsk-File-X base64 encoded aliases created by BibDesk to normal file paths