Skip to content

Instantly share code, notes, and snippets.

View markryall's full-sized avatar

Mark Ryall markryall

View GitHub Profile
defmodule Madlib do
@default_io :erlang.group_leader
def main(_, device \\ @default_io) do
noun = prompt device, "noun"
verb = prompt device, "verb"
adjective = prompt device, "adjective"
adverb = prompt device, "adverb"
@markryall
markryall / gist:10001630
Created April 6, 2014 04:39
keybase.md
### Keybase proof
I hereby claim:
* I am markryall on github.
* I am markryall (https://keybase.io/markryall) on keybase.
* I have a public key whose fingerprint is 6319 D784 5B16 05AB F99A E716 F2AC FEFE F621 8F13
To claim this, I am signing this object:
@markryall
markryall / git-step
Created December 22, 2014 04:41
git-step
#!/usr/bin/env ruby
all = `git rev-list master --reverse`.split
if File.exist?('.git-step')
index = all.index File.read('.git-step').chomp
index += 1 if index
end
index ||= 0
cardigan > list
------------------------------------------------------------------------
| index | name | priority |
------------------------------------------------------------------------
| 1 | allow columns to be truncated in list | |
| 2 | automatically commit card operations for git | |
| 3 | automatically commit card operations for hg | |
| 4 | automatically commit card operations for svn | |
| 5 | card history report | |
| 6 | card workflow | |
irb --> RUBY_VERSION
==> "1.9.1"
irb --> module M
module A
def execute(&block)
instance_eval(&block)
end
end
end
Here's just a taste of life with a BigPond Elite™ USB Mobile Card (on mac os x 10.6.3 and the latest driver 2.16.9):
Wed May 5 21:38:02 EST 2010 - plugged in
Wed May 5 21:38:42 EST 2010 - connected (with 100% next g signal)
Wed May 5 21:44:57 EST 2010 - disconnected
Wed May 5 21:45:18 EST 2010 - connected
Wed May 5 21:47:36 EST 2010 - disconnected
Wed May 5 21:47:57 EST 2010 - connected
Wed May 5 21:50:53 EST 2010 - disconnected and the 'bigpond wireless' application crashed
Wed May 5 21:51:20 EST 2010 - connected
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\0bash]
@="Prompt - bash"
[HKEY_CLASSES_ROOT\Directory\shell\0bash\command]
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""
[HKEY_CLASSES_ROOT\Directory\shell\0cmd]
@="Prompt - cmd"
module Things
class Thing
instance_methods.each { |m| undef_method m unless m =~ /^__/ or ['instance_eval'].include?(m) }
include Things
def initialize
@hash = {}
end
def __hash
@markryall
markryall / brew -> ghc -> cabal -> atomo
Created November 14, 2010 01:31
my attempt to install atomo on snow leopard with brew, ghc, cabal
> brew install ghc
Formula already installed: /usr/local/Cellar/ghc/6.12.3
> wget http://hackage.haskell.org/packages/archive/cabal-install/0.8.2/cabal-install-0.8.2.tar.gz
> tar zxvf cabal-install-0.8.2.tar.gz
> cd cabal-install-0.8.2
> sh bootstrap.sh
> export PATH=~/.cabal/bin:$PATH
> cabal install atomo
@markryall
markryall / the story so far
Created November 27, 2010 04:35
songbird.rb
require 'rubygems'
require 'sequel'
require 'cgi'
require 'splat'
home = File.expand_path '~'
profiles = "#{home}/Library/Application Support/Songbird2/Profiles"
profile = "e6rg7czm.default"
db_path = "#{profiles}/#{profile}/db/main@library.songbirdnest.com.db"