This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_cache_path File.expand_path("../", __FILE__) | |
cookbook_path File.expand_path("../cookbooks", __FILE__) | |
json_attribs "https://raw.github.com/gist/2861861/f4a5f4b78f5cd88813151be598a4782bfbbb0ed4/node.json" | |
recipe_url "https://github.com/worace/chef-repo/blob/master/vim-chef-solo-tar.gz?raw=true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tassilo's zsh from http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/ | |
# 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%})" | |
PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.new | |
=> #<MyClass:0x007faa21080d40> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
horacewilliams @ WoracesWorkshop / level1 / master ➸ ruby miner.rb | |
the content is: | |
tree 0dcb7aa769718cbded43797b27130f2387335ac6 | |
parent 0000002cb344c4fb2cd6d8d08e4c0f0b4c8bb5ff | |
author CTF user <[email protected]> 12345 +0000 | |
committer CTF user <[email protected]> 12345 +0000 | |
Give me a Gitcoin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/sha1' | |
class Miner | |
attr_reader :tree, :parent, :timestamp | |
def initialize | |
@tree=`git write-tree`.chomp | |
@parent=`git rev-parse HEAD`.chomp | |
@timestamp=12345 | |
prepare_index | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'json' | |
require 'ruby-prof' | |
class Index | |
attr_reader :base_path, :index | |
def initialize(base_path) | |
@base_path = base_path | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cracklepop(i) | |
if i % 15 == 0 | |
"CracklePop" | |
elsif i % 5 == 0 | |
"Pop" | |
elsif i % 3 == 0 | |
"Crackle" | |
else | |
i | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TicTacToe | |
class Application | |
def run | |
display_launch_options | |
end | |
def display_launch_options | |
puts "n: New Game" | |
puts "q: Quit" | |
selection = gets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-09-15 00:13:11.917 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb76f4e0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/GeoServices.axbundle> (not loaded) | |
2014-09-15 00:13:11.922 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb64f090 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/StoreKitFramework.axbundle> (not loaded) | |
2014-09-15 00:13:11.925 troutr-ios[37485:60b] Cannot find executable for CFBundle 0xb65a190 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func guessOutsideDelta(guess, x float64) bool { | |
delta := .00000000001 | |
return (math.Abs(guess * guess - x) > delta) |