Skip to content

Instantly share code, notes, and snippets.

@tissak
tissak / SHA1.rb
Last active August 29, 2015 14:17 — forked from reprah/SHA1.rb
#!/usr/bin/ruby
require 'rubygems'
require 'active_support/all'
require 'digest/sha1'
def leftrotate(value, shift)
return ( ((value << shift) | (value >> (32 - shift))) & 0xffffffff)
end
# FIPS 180-2 -- relevant section #'s below
@tissak
tissak / Gemfile
Last active August 29, 2015 14:08 — forked from hryk/Gemfile
source "https://rubygems.org/"
gem "neo4j"
gem "pry"
gem "minitest"
gem "jbundler"
@tissak
tissak / 0_reuse_code.js
Created January 20, 2014 02:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
attr_accessor :controllerDelegate
def initWithFrame(frame, andDelegate: delegate)
self.initWithFrame(frame)
@controllerDelegate = delegate
setupFrownImage
setupSorryLabel
setupButton
self
end
@tissak
tissak / mountain-lion-brew-setup.markdown
Created June 17, 2012 02:06 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.