Skip to content

Instantly share code, notes, and snippets.

View scottferg's full-sized avatar

Scott Ferguson scottferg

  • Numerator/InfoScout
  • Chicago, IL
View GitHub Profile

Keybase proof

I hereby claim:

  • I am scottferg on github.
  • I am scottferg (https://keybase.io/scottferg) on keybase.
  • I have a public key whose fingerprint is AFDD 6827 72B3 7955 FC19 BB83 66CE A617 94A1 E241

To claim this, I am signing this object:

# build
sudo docker build -t pokerap .
# run
sudo docker run -v /dev/log:/dev/log pokerap /go/bin/gokerap
# check syslog
sudo tail /var/log/syslog
# here are the cool lines I like
export GOROOT=~/Documents/goandroid/go
export GOPATH=~/Documents/goandroid/goandroid/hello-gl2/
export NDK_ROOT=~/Documents/android-ndk/build/tools/ndk-toolchain
submission := func() {
label:
for {
switch message := psc.Receive().(type) {
case redis.Message:
return db.Loads(message.Data)
case error:
log.Println(colors.Red("Failed to pubsub on trading session! %e", message.Error))
break label
}
package main
import (
"flag"
"fmt"
"github.com/scottferg/Fergulator/nes"
"os"
"runtime"
"runtime/pprof"
)
package main
import (
"github.com/scottferg/Go-SDL/sdl"
)
func GetKey(ev interface{}) int {
if k, ok := ev.(sdl.KeyboardEvent); ok {
switch k.Keysym.Sym {
case sdl.K_z: // A
package com.ferg.fergboy.memory;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.util.Log;
import java.nio.IntBuffer;
import java.io.*;
import org.apache.commons.io.IOUtils;
@scottferg
scottferg / gbrom.txt
Created October 13, 2012 23:35
Gameboy ROM header info
Gameboy ROM Header Info :: SephirothBCH :: v1.01 :: 2000/11/28
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\ After the release of this document, I am temporarily \\\
\\\ leaving the coding and emulation scene. The last few \\\
\\\ weeks of my life have been especially rough, mainly \\\
\\\ brought on by the death of my uncle, Roy Colbert. \\\
\\\ I would like to dedicate this doc, as well as any \\\
\\\ other progs I make to his memory. \\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
@scottferg
scottferg / gist:3854544
Created October 8, 2012 19:51
Go GL crash OSX
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x7fff949b0af4]
goroutine 1 [running]:
goroutine 2 [syscall]:
created by runtime.main
/private/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/bindist497693387/go/src/pkg/runtime/proc.c:221
goroutine 3 [syscall]:
@scottferg
scottferg / mmc1.go
Created September 26, 2012 01:48
NES PPU and MMC1 mapper
package main
import (
"fmt"
)
const (
BankUpper = iota
BankLower
)