Skip to content

Instantly share code, notes, and snippets.

@jabley
jabley / Profiling.sh
Last active August 29, 2015 14:00
Exploring go pipelines and concurrency constructs
master % scala ~/Projects/stripe-ctf-3/level1 > go tool pprof solve parallel.prof
Welcome to pprof! For help, type 'help'.
(pprof) topN
Total: 3501 samples
2696 77.0% 77.0% 2696 77.0% runtime.mach_semaphore_wait
227 6.5% 83.5% 227 6.5% runtime.usleep
95 2.7% 86.2% 95 2.7% crypto/sha1.block
50 1.4% 87.6% 50 1.4% runtime.mach_semaphore_timedwait
39 1.1% 88.7% 39 1.1% runtime.casp
26 0.7% 89.5% 136 3.9% runtime.mallocgc
@jabley
jabley / lpa_help.go
Last active August 29, 2015 14:02
Simple thing to download LPA help text occurrences over time
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"time"
@jabley
jabley / keybase.md
Created September 24, 2014 13:01
Keybase claim file

Keybase proof

I hereby claim:

  • I am jabley on github.
  • I am jamesabley (https://keybase.io/jamesabley) on keybase.
  • I have a public key whose fingerprint is 84A2 6DB0 2192 B901 AE66 40D6 EEFB 65A6 FA2D E7C6

To claim this, I am signing this object:

@jabley
jabley / Overview.md
Last active August 29, 2015 14:13
Python and Go side-by-side

We have 2 projects:

https://github.com/alphagov/backdrop/tree/master/backdrop/write implements the existing write API.

The Go version is virtually identical on a feature basis, except it's faster :)

Writing

@jabley
jabley / Main.java
Created February 28, 2015 13:53
Printing out rows
import java.util.Arrays;
public final class Main {
public static void main(String[] args) {
int[][] rows = new int[18][28];
for (int[] row : rows) {
System.out.println(Arrays.toString(row));
}
}
@jabley
jabley / email.md
Last active August 29, 2015 14:16
Democracy Club email

Dear Potential MP,

I'm a potential voter / constituent for Insert your consituency here.

I've been looking at candidates CVs on Democracy Club, to understand whether I feel a candidate best represents my views in the coming election. I would appreciate you adding your CV to this service, so that I and all other voters in the constituency have all the data available to us when it comes to making a decision on polling day.

Verifying I am +jabley on my passcard. https://onename.com/jabley

It has been a bit horrifying to watch the BitKeeper saga unfold. Not that it's surprising of course that Larry rescinded the BK Linux license; if you know Larry or even know of him, you know that Larry's tragic flaws -- hypersensitivity, volatility and vindictiveness -- made this an inevitability of sorts1. So the horrifying bit has not been the act itself, but rather the specific reason that Larry cited when rescinding the license: he seems to have taken issue with Tridge's attempt to reverse engineer the BitKeeper protocols. This rankles; I (like many engineers, I suspect) view reverse engineering as a Natural Right. That is, I believe that we are endowed with certain unalienable Rights, and that among these are Life, Liberty and the pursuit of Understanding how the hell something works (or doesn't, as is frequently the case). Perhaps perversely to some, it is my strong belief in the right to reverse engineer that lea

[jabley@176282-app1 ruby-ffi~mercurial]$ jruby -rffi -d -e 'puts FFI::Platform::ARCH'
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:55)
at org.jruby.ext.ffi.jna.DynamicLibrary.open(DynamicLibrary.java:59)
at org.jruby.ext.ffi.jna.DynamicLibrary$s_method_2_0$RUBYINVOKER$open.call(org/jruby/ext/ffi/jna/DynamicLibrary$s_method_2_0$RUBYINVOKER$open.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:293)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
at org.jruby.ast.ConstDeclNode.interpret(ConstDeclNode.java:97)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
<?xml version="1.0"?>
<project>
<parent>
<artifactId>rails-ui</artifactId>
<groupId>com.example</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>rails-ui-webapp</artifactId>