Skip to content

Instantly share code, notes, and snippets.

@saljam
saljam / init.go
Last active January 22, 2017 20:36
Camlistore-booting Init in Go.
// +build linux
package main
import (
"log"
"time"
"syscall"
"errors"
"os"
"os/exec"
@saljam
saljam / rtl.html
Last active September 23, 2015 17:27
Include this script in your Go present slides to make them right-to-left
<script>
document.addEventListener('DOMContentLoaded', function(){
// Code is generally left-to-right, so we set all <pre> tags with dir=lrt explicitly.
var pres = document.getElementsByTagName("pre");
for (var i = 0; i < pres.length; i++) {
pres[i].dir="ltr";
}
// Everything else is right-to-left.
document.getElementsByTagName("body")[0].dir="rtl";
#!/bin/bash
set -e
# To reproduce on sid:
#
# apt-get install gcc make bc gcc-aarch64-linux-gnu qemu-system-arm qemu-user-static
#
# # build a kernel
# curl -O https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.5.tar.xz
{
"nodes": [
{
"datums": [
{
"expr": "\u0011[__3.__5]",
"name": "shape",
"type": "_fabtypes.Shape",
"uid": 0
},
@saljam
saljam / game.txt
Created June 16, 2018 15:46
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[7119,"a",3,"0",156,"a",5,"0",155,"a",5,"0",155,"a",5,"0",156,"a",3,"0",8238,"a"],[4058,"a",45,"8",114,"a",47,"8",113,"a",47,"8",113,"a",47,"8",113,"a",47,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",17,"a",3,"0",17,"a",5,"8",113,"a",5,"8",16,"a",5,"0",16,"a",5,"8",113,"a",5,"8",16,"a",5,"0",16,"a",5,"8",113,"a",5,"8",16,"a",5,"0",16,"a",5,"8",113,"a",5,"8",17,"a",3,"0",17,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8",113,"a",5,"8",37,"a",5,"8"
#!/bin/bash
# Run this on digital ocean recovery OS to wipe out whatever is on disk /dev/vda
# and replace it with an ipxe image configured with the machine's IP addresses,
# from DO's metadata service.
# It also creates an unformatted partition spanning the rest of /dev/vda. (It's
# used for cache once booted.)
set -e