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
// 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 "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
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
#!/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
#!/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
#!/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 | |
OWNER=libvirt-qemu:libvirtd | |
RELEASE=https://cloudflare.cdn.openbsd.org/pub/OpenBSD/6.6/amd64 | |
function sudo { | |
command sudo -p "Please enter password for %u@%h to fiddle with virtual machines: " ls /dev/null >/dev/null | |
command sudo "$@" | |
} |
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 is a sample macOS-app-bundling program to demonstrate how to | |
// automate the process described in this tutorial: | |
// | |
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
// | |
// Bundling the .app is the first thing it does, and creating the DMG is the | |
// second. Making the DMG is optional, and is only done if you provide | |
// the template DMG file, which you have to create beforehand. | |
// | |
// Example use: |
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 | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |