Skip to content

Instantly share code, notes, and snippets.

View danielmorrison's full-sized avatar

Daniel Morrison danielmorrison

View GitHub Profile
@ntalbott
ntalbott / gharch
Created April 11, 2011 21:46
Github Repo Archive Script
#!/usr/bin/env ruby
target = ARGV[0]
dest = ARGV[1]
unless target && dest
puts "Github Archive Usage: gharch <user/repo> <destdir>"
exit(1)
end
remote, repo = target.split("/")
@mikehale
mikehale / a-screenshot.md
Created July 1, 2011 20:57 — forked from akahn/a-screenshot.md
Embed gravatars in Propane chat

@rromanchuk
rromanchuk / gist:1453014
Created December 9, 2011 19:51
ruby-debug19 with ruby 1.9.3 with RVM
export RVM_SRC=/Users/ryan/.rvm/src/ruby-1.9.3-p0
# get the following here http://rubyforge.org/frs/?group_id=8883
gem install archive-tar-minitar
gem install ruby_core_source-0.1.5.gem -- --with-ruby-include=/$RVM_SRC
gem install linecache19-0.5.13.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug19-0.11.6.gem -- --with-ruby-include=/$RVM_SRC
@fzf
fzf / konami.js
Last active December 19, 2015 13:09
$(function () {
// konami code - up up down down left right left right b a
var konami = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 66, 65);
var codeBuffer = "";
$(document).keyup(function (e) {
codeBuffer += String.fromCharCode(e.which);
if (konami.substring(0, codeBuffer.length) == codeBuffer) {
if (konami.length == codeBuffer.length) {
ba();
}

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal