This file contains hidden or 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 | |
MAC=52:54:00:__:__:__ | |
VIRTNAME=______ | |
VM_STORAGE_DIR=/srv/virts | |
BRIDGE=br0 | |
INSTALLER=http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/ | |
OS_VARIANT=ubuntu18.04 # from `osinfo-query os` | |
cmd=$(basename $0) |
This file contains hidden or 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 | |
cp overlay /etc/initramfs-tools/scripts/ | |
echo "overlay" >> /etc/initramfs-tools/modules | |
mkdir /overlay /overlay/temp /overlay/base | |
update-initramfs -c -k `uname -r` | |
echo "initramfs initrd.img-`uname -r`" >> /boot/config.txt | |
echo "boot=overlay `cat /boot/cmdline.txt`" > /boot/cmdline.txt |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os, struct, sys | |
if len(sys.argv) < 3: | |
sys.exit( | |
"Convert a text file with up to 256 RGB values to Photoshop's ACT format\n\n" | |
" Usage: " +sys.argv[0] + " <infile> <outfile>\n" | |
" <infile> is a text file with R G B values [0-255] separated by\n" | |
" whitespace, one triplet per line\n" | |
" <outfile> will be written in Photoshop's .ACT color format\n" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strconv" | |
"strings" | |
) |
This file contains hidden or 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
package main | |
import "fmt" | |
type BrailleDots [4][2]bool | |
func (b BrailleDots) String() string { | |
var braille uint32 = 0x2800 | |
set := [4][2]uint32{ | |
{0x01, 0x08}, |
This file contains hidden or 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
// Interact wraps google/goexpect with a simpler interface | |
package main | |
import ( | |
"io" | |
"log" | |
"regexp" | |
"time" |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"flag" | |
"io/ioutil" | |
"log" | |
"path" | |
"github.com/yuin/goldmark" |
This file contains hidden or 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
# Reconstructed via infocmp from file: /home/ray/.terminfo/x/xterm-kitty | |
xterm-kitty|KovIdTTY, | |
am, ccc, hs, km, mc5i, mir, msgr, npc, xenl, | |
colors#256, cols#80, it#8, lines#24, pairs#32767, | |
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, | |
bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, | |
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M, | |
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, | |
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, | |
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, |
This file contains hidden or 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
package main | |
// zipguess.go | |
// reads a tsv file, one set of possibilities per line | |
// one possibile segment is chosen from each line in order | |
// and concatenated together into a guess | |
import ( | |
"flag" |
This file contains hidden or 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 | |
# Create a list of pages from the website, one url per line, in a file named "pages". Easiest | |
# way for small sites is to get them from the admin interface, open each page in a tab then | |
# copy all tab URLs to the clipboard via chrome extension: | |
# https://chrome.google.com/webstore/detail/copy-all-urls/djdmadneanknadilpjiknlnanaolmbfk?hl=en | |
# Have ripgrep and wget handy. The heavy lifting is done by an html to markdown lib, wrapped here: | |
# https://github.com/suntong/html2md#usage | |
for page in $(cat pages); do |