Skip to content

Instantly share code, notes, and snippets.

View jerodsanto's full-sized avatar
:shipit:
Always be shipping

Jerod Santo jerodsanto

:shipit:
Always be shipping
View GitHub Profile
ruby -i -pe '$_.gsub!("etch","lenny")' /etc/apt/sources.lst
#!/usr/bin/env ruby
unless ARGV.length == 1
puts "Usage: #{__FILE__} [file to convert]"
exit
end
original_file = ARGV.first
sans_extension = original_file.gsub(/\.flv$/,"")
system "ffmpeg -i #{original_file} -b 192K #{sans_extension}.mp3"
require 'rubygems'
require 'benchmark'
gem = ARGV.shift.strip rescue ''
if gem == ''
STDERR.puts "usage: #{$0} [gem]"
exit 1
end
`free`
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base
30 12 * * * ruby /tmp/vote_for_github.rb
#!/usr/bin/env ruby
#--
# Name : git_watch.rb
# Author : Jerod Santo
# Contact : "[email protected]".reverse
# Date : 2008 October 14
# About : Checks a git repository for changes and emails provided email
# address if changes have been made. Schedule with cron.
#--
irb(main):001:0> require 'models'
=> true
irb(main):002:0> DataMapper.setup(:default, "sqlite3://test.sqlite3")
=> #<DataMapper::Adapters::Sqlite3Adapter:0x2b3089430d48 @name=:default, @field_naming_convention=DataMapper::NamingConventions::Underscored, @resource_naming_convention=DataMapper::NamingConventions::UnderscoredAndPluralized, @uri=#<Addressable::URI:0x159844a14108 URI:sqlite3://test.sqlite3>, @transactions={}>
irb(main):003:0> DataMapper.auto_migrate!
Segmentation fault