Skip to content

Instantly share code, notes, and snippets.

View longda's full-sized avatar
🌴

David Long longda

🌴
View GitHub Profile
(function () {
try {
if (!google.doodle) google.doodle = {};
var a = 200,
g = -200,
j = -200,
k, l, m, n = 0,
o = 0,
p = 0,
q = 35,
var Math2 = function() {
function sin(num) {
console.log('Compute');
return Math.sin(num);
}
return {
sin: sin
}
}();
anonymous
anonymous / gist:604822
Created September 30, 2010 16:03
var sin = function(n)
{
if(sin.cache.hasOwnProperty(n)) return sin.cache[n];
var result = Math.sin(n);
sin.cache[n] = result;
return result;
};
sin.cache = {};
@caged
caged / gist:1173725
Created August 26, 2011 15:50
d3.js experiment - Donuts, Bars and Crime.
#
# CoffeeScript for http://dealloc.me/demos/crime/2011.html
# Copyright (c) 2011 Justin Palmer <http://github.com/Caged>
# LICENSE: http://www.opensource.org/licenses/mit-license.php
$ ->
hash = document.location.hash
year = if hash then hash.replace('#', '') else 2011
[pt,pl,pb,pr] = [35, 20, 20, 20]
w = (900 - (pl + pr)) / 2
h = w
@rcarmo
rcarmo / thespian-raft.py
Created August 7, 2016 08:17
The Raft leader election protocol, implemented atop GoDaddy's Thespian actor library
from thespian.actors import *
from datetime import datetime, timedelta
from logging import getLogger, basicConfig, DEBUG
from random import randint
basicConfig(level=DEBUG)
log = getLogger(__name__)
class Postman(Actor):
# CommitBot
# An interface for audibly broadcasting commit messages
# Tested on OSX
# Created by the friendly team at Hunch.com (sharing is caring!)
#
# Installation
# 1. replace USERNAME, PASSWORD, and HOSTNAME below
# 2. ...
# 3. profit!
#!/usr/bin/env ruby
require 'ftools'
require 'fileutils'
require 'rubygems'
require 'RMagick'
include Magick
require 'open3'
def merge( files = [] )
@cowboy
cowboy / recruiter-stalker.log
Last active May 8, 2018 12:51
recruiter stalker
[12:06] <TrevorTSG> Ben!
[12:07] <TrevorTSG> I am a technical recruiter, ipsofacto, I have no idea what's
going on here, but I have a position for a jQuery stud up
for grabs if you're game
[12:07] <TrevorTSG> here in the Boston area
[12:09] <ben_alman> nope
[12:09] <TrevorTSG> But you have to give me props for stalking you all the way
into a jquery chat room, right?
[12:15] TrevorTSG left IRC. (Ping timeout: 250 seconds)
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
@coryhouse
coryhouse / gist:9e09fa659cf89e4eddef
Created August 6, 2015 13:09
Author data for "Building Applciations with React and Flux" on Pluralsight
module.exports = {
authors:
[
{
id: 'cory-house',
firstName: 'Cory',
lastName: 'House'
},
{
id: 'scott-allen',