Skip to content

Instantly share code, notes, and snippets.

Horace Williams worace

Block or report user

Report or block worace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
worace / solo.rb
Created Jun 4, 2012
Sample chef solo base file
View solo.rb
file_cache_path File.expand_path("../", __FILE__)
cookbook_path File.expand_path("../cookbooks", __FILE__)
json_attribs ""
recipe_url ""
View tasilo.zsh-theme
# tassilo's zsh from
# stashing this for reference for colors :)
local blue_op="%{$fg[blue]%}[%{$reset_color%}"
local blue_cp="%{$fg[blue]%}]%{$reset_color%}"
local path_p="${blue_op}%~${blue_cp}"
local user_host="${blue_op}%n@%m${blue_cp}"
local ret_status="${blue_op}%?${blue_cp}"
local hist_no="${blue_op}%h${blue_cp}"
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})"
View memoize.rb
1.9.3-p448 :014 > class MyClass
1.9.3-p448 :015?> def my_config
1.9.3-p448 :016?> @@my_config ||= nil
1.9.3-p448 :017?> end
1.9.3-p448 :018?> def my_config=(setting)
1.9.3-p448 :019?> @@my_config = setting
1.9.3-p448 :020?> end
1.9.3-p448 :021?> end
1.9.3-p448 :022 > config =
=> #<MyClass:0x007faa21080d40>
View gist:8570472
horacewilliams @ WoracesWorkshop / level1 / master ➸ ruby miner.rb
the content is:
tree 0dcb7aa769718cbded43797b27130f2387335ac6
parent 0000002cb344c4fb2cd6d8d08e4c0f0b4c8bb5ff
author CTF user <> 12345 +0000
committer CTF user <> 12345 +0000
Give me a Gitcoin
View gist:8571597
require 'digest/sha1'
class Miner
attr_reader :tree, :parent, :timestamp
def initialize
@tree=`git write-tree`.chomp
@parent=`git rev-parse HEAD`.chomp
View gist:8653905
require 'sinatra'
require 'json'
require 'ruby-prof'
class Index
attr_reader :base_path, :index
def initialize(base_path)
@base_path = base_path
View crackle_pop.rb
def cracklepop(i)
if i % 15 == 0
elsif i % 5 == 0
elsif i % 3 == 0
View tic_tac_toe.rb
module TicTacToe
class Application
def run
def display_launch_options
puts "n: New Game"
puts "q: Quit"
selection = gets
View gist:4b1d430db1c7be257023
2014-09-15 00:13:11.917 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb76f4e0 </Applications/> (not loaded)
2014-09-15 00:13:11.922 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb64f090 </Applications/> (not loaded)
2014-09-15 00:13:11.925 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb65a190 </Applications/> (not loaded)
2014-09-15 00:13:11.992 troutr-ios[37485:60b] authentication loadview
2014-09-15 00:13:11.992 troutr-ios[37485:60b] auth view init
2014-09-15 00:13:11.993 troutr-ios[37485:60
View exercise-loops-and-functions.go
package main
import (
func guessOutsideDelta(guess, x float64) bool {
delta := .00000000001
return (math.Abs(guess * guess - x) > delta)
You can’t perform that action at this time.