This file contains 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
function mount_iso() { | |
local iso_file | |
local mnt_directory | |
local opt | |
while getopts f:d:h opt; do | |
case $opt in | |
(h) | |
print "Options:" | |
print " -f <file.iso>" |
This file contains 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
<[Thu Aug 26, 03:16:02] | |
[oshuma@trendwhore] - [~/Projects/nerdno.de] | |
<[%] (master)xxx> bundle install | |
Fetching http://github.com/mongoid/mongoid.git | |
remote: Counting objects: 17892, done. | |
remote: Compressing objects: 100% (6107/6107), done. | |
remote: Total 17892 (delta 11231), reused 17261 (delta 10661) | |
Receiving objects: 100% (17892/17892), 2.03 MiB | 1.25 MiB/s, done. | |
Resolving deltas: 100% (11231/11231), done. | |
/usr/local/lib/site_ruby/1.8/rubygems/package/tar_input.rb:111:in `initialize': No metadata found! (Gem::Package::FormatError) |
This file contains 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 'mime/types' | |
require 'RMagick' | |
require 'yaml' | |
module NerdNode | |
module Photo | |
class Collection | |
# A list of valid MIME types. | |
TYPES = %w{ |
This file contains 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
#!/usr/bin/env ruby | |
def run_specs | |
system('rake spec') | |
end | |
# Ctrl-\ | |
Signal.trap('QUIT') do | |
puts "\n--- Running all specs ---\n" | |
run_specs |
This file contains 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
#!/usr/bin/python-2.6 | |
# Writen by http://github.com/mdellavo and posted here, because he's too fucking lazy. | |
import itertools, string, random, re, time | |
import adns | |
tlds = [ 'com' , 'net' , 'us' , 'mobi' , 'ws', | |
'me' , 'info' , 'biz' , 'org' , 'ca', | |
'jobs' , 'am' , 'be' , 'de' , 'es' ] |
This file contains 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 'rubygems' | |
require 'sinatra' | |
require 'json' | |
def json_get(route, options={}, &block) | |
get(route, options) do | |
content_type 'text/json' | |
block.call.to_json | |
end | |
end |
This file contains 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
deps = %w[ mongo other-lib someother-lib ] | |
begin | |
deps.each { |dep| require dep } | |
rescue LoadError | |
require 'rubygems' | |
deps.each { |dep| require dep } | |
end |
This file contains 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
#!/usr/bin/env ruby | |
def run_specs | |
with_rubygems = RUBY_VERSION =~ /1.8/ ? "-r rubygems" : "" | |
system("rake #{with_rubygems} spec") | |
end | |
# Ctrl-\ | |
Signal.trap('QUIT') do | |
puts "\n--- Running all specs ---\n" |
This file contains 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
class MediaList | |
# File extensions. | |
TYPES = { | |
:audio => [ | |
'aac', | |
'aif', | |
'flac', | |
'mp3', | |
'oga', |
This file contains 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
# Ubuntu Linux Specific Configuration | |
export GREP_OPTIONS='--color=auto -Hn' | |
export PATH=$PATH:"$HOME/Source/Java/BlackBerry/WTK2.5.2/bin" | |
function trash() { | |
mv -i $* $HOME/.local/share/Trash/files/ | |
} | |
function use_ruby() { | |
version=$1 |