Skip to content

Instantly share code, notes, and snippets.

View Oshuma's full-sized avatar

Dale Campbell Oshuma

View GitHub Profile
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>"
<[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)
require 'mime/types'
require 'RMagick'
require 'yaml'
module NerdNode
module Photo
class Collection
# A list of valid MIME types.
TYPES = %w{
#!/usr/bin/env ruby
def run_specs
system('rake spec')
end
# Ctrl-\
Signal.trap('QUIT') do
puts "\n--- Running all specs ---\n"
run_specs
#!/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' ]
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
deps = %w[ mongo other-lib someother-lib ]
begin
deps.each { |dep| require dep }
rescue LoadError
require 'rubygems'
deps.each { |dep| require dep }
end
#!/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"
class MediaList
# File extensions.
TYPES = {
:audio => [
'aac',
'aif',
'flac',
'mp3',
'oga',
# 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