I hereby claim:
- I am bulters on github.
- I am bulters (https://keybase.io/bulters) on keybase.
- I have a public key ASBlwOZ7n3qt7HBdF3W8nDa8WsI94AYWLC_4aLvsltZSHAo
To claim this, I am signing this object:
runProgramAt :: Int -> Memory -> Memory | |
runProgramAt pc m = let opcode = m M.! pc | |
left = m M.! (m M.! (pc + 1)) | |
right = m M.! (m M.! (pc + 2)) | |
result = m M.! (pc + 3) | |
next = pc + 4 in | |
case opcode of | |
-- 99 signals the end of execution, so just return the memory | |
99 -> m | |
-- 1 indicates addition (left + right -> result) |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class FBAuthenticator | |
def initialize(uid, token) | |
@uid = uid | |
@token = token | |
end | |
def authenticate(args) | |
raise ArgumentError unless args.has_key?(:success) | |
raise ArgumentError unless args.has_key?(:fail) |
" utf-8 only | |
scriptencoding utf-8 | |
" no vi compat | |
set nocompatible | |
function! InstallVundle () | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) |
#!/bin/bash | |
for USER in `cat .fingers` | |
do | |
finger $USER | |
echo "================================================================================" | |
done |
prooflink_url = "https://" + [ProoflinkConnect.config.subdomain, ProoflinkConnect.config.provider_endpoint].join(".") + "/api/accounts/sign_in" | |
prooflink_params = { | |
:api_key => ProoflinkConnect.config.api_key, | |
:user => { | |
:email => username, | |
:password => password | |
} | |
} | |
prooflink_auth = JSON.parse(RestClient.post(prooflink_url, prooflink_params).body) | |
# token zit nu in prooflink_auth["token"] |
def scaleAndRotateImage(image) | |
scaleAndRotateImage(image, maxResolution: 640) | |
end | |
def scaleAndRotateImage(image, maxResolution: maxResolution) | |
imgRef = image.CGImage | |
width, height = CGImageGetWidth(imgRef), CGImageGetHeight(imgRef) | |
bounds = CGRectMake(0, 0, width, height) | |
if (width > maxResolution || height > maxResolution) |
GGCode is a small Google Maps API Geocoder using the Google Maps API v3.
Usage is extremely easy:
gem 'ggcode', :git => 'https://gist.github.com/bulters/5133207'