Skip to content

Instantly share code, notes, and snippets.

@andyleap
andyleap / parser.go
Created December 2, 2014 04:42
Parser Combinator
package main
import (
"fmt"
"io"
"strings"
"regexp"
"reflect"
)
@andyleap
andyleap / Bookmarklet
Last active August 29, 2015 14:10
screeps console history
javascript: $(function(){ace.edit($("div.ace_editor")[0]).commands.addCommand({name:"saveFile",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(a,b,c){$("div.controls button.submit").click()}});});

Keybase proof

I hereby claim:

  • I am andyleap on github.
  • I am vendan (https://keybase.io/vendan) on keybase.
  • I have a public key whose fingerprint is ED99 1AFC 940F F825 2F0B DD66 66B8 D610 4E27 4452

To claim this, I am signing this object:

package arrayslice
import "testing"
func BenchmarkArray8for(b *testing.B) {
var a [8]int
for i := 0 ; i < b.N ; i++ {
for j := 0 ; j < len(a) ; j++ {
a[j] += j
}