Skip to content

Instantly share code, notes, and snippets.

View ajwdev's full-sized avatar

Andrew Williams ajwdev

View GitHub Profile
@ajwdev
ajwdev / gist:63f3594a1b3752626af40f2c35f83b12
Last active June 24, 2019 00:39
Ubiquiti Google DynDNS
# Based on https://help.ubnt.com/hc/en-us/articles/204976324
set service dns dynamic interface eth1 service custom-google server domains.google.com
set service dns dynamic interface eth1 service custom-google host-name foo.example.com
set service dns dynamic interface eth1 service custom-google login <login from google domains>
set service dns dynamic interface eth1 service custom-google password <password from google domains>
set service dns dynamic interface eth1 service custom-google options "zone=example.com\nssl=yes"
set service dns dynamic interface eth1 service custom-google protocol dyndns2
@ajwdev
ajwdev / hello.S
Last active August 21, 2017 21:55
OSX "Hello World" in x86 assembly
$ as hello.S -Wall -o hello.o
# or for 32-bit
# $ as hello_32.S -Wall -o hello.o -m32
$ ld hello.o -e _start -macosx_version_min 10.12.0 -lSystem -o hello
$ ./hello
Hello world!

Keybase proof

I hereby claim:

  • I am williamsandrew on github.
  • I am williamsandrew (https://keybase.io/williamsandrew) on keybase.
  • I have a public key ASCeCL_-nrOnJK2L2rtKSEmA6qxnKv7byOH441pgcqokXwo

To claim this, I am signing this object:

@ajwdev
ajwdev / fail.log
Last active March 3, 2016 22:47
Heka Issue #1873
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
# docker run -ti gcr.io/google_containers/hyperkube:v1.1.8 sh -c 'file /hyperkube && cat /hyperkube'
/hyperkube: XML 1.0 document text
<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>
package main
import (
"bytes"
"encoding/csv"
"fmt"
"io"
"log"
"os"
"sort"
@ajwdev
ajwdev / heka-test-shutdown.toml
Last active September 3, 2015 20:52
Heka sandbox issue
[ShutdownTest]
type = "SandboxInput"
filename = "/root/heka_testing/shutdown.lua"
ticker_interval = 2
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
def get_lineno(iseq, pos):
if pos != 0:
pos -= 1