Skip to content

Instantly share code, notes, and snippets.

View austindoeswork's full-sized avatar
🐣
hatchin' a plan

austin austindoeswork

🐣
hatchin' a plan
  • San Francisco
View GitHub Profile
@austindoeswork
austindoeswork / gist:6ee7b43868d189edc84809a1ddf1f7bd
Created August 9, 2016 21:32
auto restarting socks5 ssh proxy
#!/bin/bash
while [ true ]
do
echo "starting socks5 proxy at localhost:22222"
ssh -A -ND localhost:22222 metrics@bastion.prodnext.ottoq.com -v &
LASTPID=$!
ALIVE=true
while [ $ALIVE = true ]
@austindoeswork
austindoeswork / creature_generate.py
Last active December 2, 2016 20:11 — forked from TylerLeite/creature_generate.py
Create a random creature
from PIL import Image, ImageFilter
import os
import sys
import random
import math
def main():
if len(sys.argv) <= 1:
print "USAGE: python spritegen.py <image/dir>"
package main
import (
"bytes"
"log"
"net/smtp"
"text/template"
)
func main() {
package main
import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"sort"
"strconv"
"time"
sc [8] = gc [64]=
0 block 0[8]
1 ----*\ block 1[8]
1 \---> block 2[8]
1 block 3[8]
. ...
. ...
. ...
#!/bin/bash
echo "building for raspi..."
GOOS=linux GOARCH=arm GOARM=7 go build .
#!/bin/bash
commithash=$(git rev-parse --verify HEAD)
GOOS=linux go build -ldflags "-X main.commithash=$commithash" .
package main
import (
"flag"
)
var (
commithash string
versionFlag = flag.Bool("v", false, "git commit hash")
)
package main;import `fmt`;func main(){s:="package main;import `fmt`;func main(){s:=%q;fmt.Printf(s,s)}";fmt.Printf(s,s)}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Zone Editor</title>
<style>
#map {
height: 50vh;
}