Skip to content

Instantly share code, notes, and snippets.

Always be shipping

Jerod Santo jerodsanto

Always be shipping
Block or report user

Report or block jerodsanto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jerodsanto / bb.rb
Last active Aug 29, 2015
Quick & dirty script to open the current directory's git repo on BitBucket. Surely there's a better way
View bb.rb
#!/usr/bin/env ruby
if remote = `git remote -v`.lines.find { |l| l.match /bitbucket/ }
remote.match /(bitbucket\.org\/.*?)\.git/
system "open https://#{$1}"
puts "No BitBucket remote :("
View gist:4393
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
jerodsanto / jerodsanto.sublime-settings
Created Jul 20, 2015
My current Sublime Text user preferences, by request.
View jerodsanto.sublime-settings
"auto_complete_commit_on_tab": true,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
View git_watch.rb
#!/usr/bin/env ruby
# Name : git_watch.rb
# Author : Jerod Santo
# Contact : "moc.liamg@otnas.dorej".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.
View crontab
30 12 * * * ruby /tmp/vote_for_github.rb
View gist:44423
# 1) Point * in your DNS setup to your server.
# 2) Setup an Apache vhost to catch the star pointer:
# <VirtualHost *:80>
# ServerName *
# </VirtualHost>
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base
View gemweight.rb
require 'rubygems'
require 'benchmark'
gem = ARGV.shift.strip rescue ''
if gem == ''
STDERR.puts "usage: #{$0} [gem]"
exit 1
View gist:62249
#!/usr/bin/env ruby
unless ARGV.length == 1
puts "Usage: #{__FILE__} [file to convert]"
original_file = ARGV.first
sans_extension = original_file.gsub(/\.flv$/,"")
system "ffmpeg -i #{original_file} -b 192K #{sans_extension}.mp3"
View gist:65318
ruby -i -pe '$_.gsub!("etch","lenny")' /etc/apt/sources.lst
View skype_where_is.rb
require 'resolv'
require 'rubygems'
require 'rb-skypemac'
include SkypeMac
def set_location(loc)
Skype.send_ :command => "SET PROFILE MOOD_TEXT #{loc}"
You can’t perform that action at this time.