Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am sheldon on github.
  • I am sheldonels (https://keybase.io/sheldonels) on keybase.
  • I have a public key whose fingerprint is 47A3 66D6 F3BE 2038 3C63 1424 98A3 0010 CAEA 7FA2

To claim this, I am signing this object:

@sheldon
sheldon / pre-commit
Last active December 27, 2015 14:19 — forked from Simbul/pre-commit
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production", "master"]
testing and stuff
@sheldon
sheldon / gist:4140527
Created November 24, 2012 17:03 — forked from phpwax/gist:4140042
Trait for defaults and settings
<?php
trait StaticDefaults{
protected static $_defaults = [];
public function __get($key){
if(is_callable($func = self::$_defaults[$key])) return $func();
return $func;
}
static public function defaults($defaults){
(= (
(fn c [l & [a]] (if l (recur (next l) (+ (if a a 0) 1)) 0))
'(1 2 3 3 1)) 5)
error:
java.lang.UnsupportedOperationException: nth not supported on this type: Long
google.load('jquery', '1.3');
google.load("maps", "2");
google.load("visualization", "1", {packages:["linechart"]});
google.setOnLoadCallback(function(){
$(document).ready(function(){
var map = new google.maps.Map2(document.getElementById("main_map"));
map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 5);
// generate random points
var all_markers = new Array();