Skip to content

Instantly share code, notes, and snippets.

View whoisjake's full-sized avatar

Jake Good whoisjake

View GitHub Profile
class Gort < Formula
desc "GORT is a Command Line Toolkit for RobotOps"
homepage "http://gort.io/"
version "0.5.2"
if MacOS.prefer_64_bit?
url "https://s3.amazonaws.com/gort-io/0.5.2/gort_0.5.2_darwin_amd64.zip"
sha256 "dbcc1f35017ec452986798468631b47350b5bc6dc33e25e812c94c74438f190a"
else
url "https://s3.amazonaws.com/gort-io/0.5.2/gort_0.5.2_darwin_386.zip"
@whoisjake
whoisjake / lithp.rb
Created October 21, 2013 15:51 — forked from fogus/lithp.rb
class Lisp
def initialize
@env = {
:label => lambda { |(name,val), _| @env[name] = val },
:quote => lambda { |sexpr, _| sexpr[0] },
:car => lambda { |(list), _| list[0] },
:cdr => lambda { |(list), _| list.drop 1 },
:cons => lambda { |(e,cell), _| [e] + cell },
:eq => lambda { |(l,r), _| l == r },
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) },
@whoisjake
whoisjake / clever_ext.rb
Created June 12, 2013 21:43
Extend the clever-ruby gem to fetch all the pages
require 'clever-ruby'
module CleverExt
def all_pages(filters={})
page_count = 1000
page_n = 1
filters[:limit] = page_count
filters[:page] = page_n
objects = []
page = all(filters)
@whoisjake
whoisjake / mindstorm.rb
Created July 4, 2011 21:42 — forked from michaelbernstein/mindstorm.rb
Lego Mindstorm Installer Gist
#!/usr/local/bin/ruby
require 'find'
p "This script will copy the contents of your LEGO MINDSTORMS NXT disc to your desktop, make necessary adjustments to the installer for Mac OS X 10.6 and later, and then initiate the MINDSTORMS installer. Please insert the MINDSTORMS NXT disc before you continue. Would you like to continue? (Y/N)"
$name = gets.chomp
if $name[0,1].casecmp("Y") == 0
$NXT_CD_Mounted = false
Dir.entries("/Volumes").each do |path|
(ns life (:use clojure.test clojure.set))
(def under-populated 1)
(def over-populated 4)
(def fertile 3)
(defn north [[x y]] [x (inc y)])
(defn south [[x y]] [x (dec y)])
(defn east [[x y]] [(inc x) y])
(defn west [[x y]] [(dec x) y])
incr_digest = Digest::MD5.new()
the_tarball.each_line do |line|
incr_digest << line
end
md5 = incr_digest.hexdigest
@whoisjake
whoisjake / gist:210408
Created October 14, 2009 21:05
My first entry for coderack.org
module Rack
# A rack middleware for wrapping sites in http://kanyelicious.appspot.com/.
class Kanye
def initialize(app)
@app = app
end
def call(env)
request_uri = env['REQUEST_URI']
# Check if kanye=true exists, remove param, and stop
@whoisjake
whoisjake / gist:178266
Created August 31, 2009 02:53
Simple module that allows you to easily search for images in tweets relative to a keyword
require 'rubygems'
require 'httparty'
require 'uri'
module PictureSearch
class TwitterSearch
include HTTParty
base_uri 'search.twitter.com'
default_params :output => 'json'
@whoisjake
whoisjake / gist:174249
Created August 24, 2009 21:54
Basic drop.io Ruby client
require 'rubygems'
# sudo gem install httparty
require 'httparty'
# sudo gem sources -a http://gems.github.com && sudo gem install multipart-post
require 'net/http/post/multipart'
require 'mime/types'
require 'pp'
class Dropio
include HTTParty

Keybase proof

I hereby claim:

  • I am whoisjake on github.
  • I am whoisjake (https://keybase.io/whoisjake) on keybase.
  • I have a public key whose fingerprint is D060 8CA9 794C 30B8 3239 56BA AB0F E856 7996 733F

To claim this, I am signing this object: