Skip to content

Instantly share code, notes, and snippets.

View chaserx's full-sized avatar
:octocat:
Mostly Meetings. Sometimes not.

Chase Southard chaserx

:octocat:
Mostly Meetings. Sometimes not.
View GitHub Profile
@chaserx
chaserx / capitalize_with_hyphens
Created May 1, 2009 19:00
This capitalize method doesn't bash hyphenated names
#!/usr/local/bin/ruby -wKU
class String
def capitalize_with_hyphens!
if self.include? "-"
pieces_array = self.split("-")
pieces_array.each { |e| e.capitalize! }
joined = pieces_array.join("-")
replace(joined)
else
#!/usr/local/bin/ruby
require "rubygems"
require "fastercsv"
require "html/table"
include HTML
# new file
outfile = File.open("outfile.html", "w")
desc "yank out the UniGene number from the records downloaded in the ncbi task"
task :uniyank do
#require 'open-uri'
#I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 = true
#can't find _why's hpricot. trying nokogiri
#require 'nokogiri'
#unigene regex
#regex = /Hs.[0-9]{6}/
#regex = /Hs.[0-9A-Z]{6}/
#!/usr/bin/env ruby
# = Delighter - pull your twitter links into delicious.
#
# Takes the first link and submits it to delicious. The description
# will be the text up to the beginning of the link, the tags whatever
# hashtags are on the tweet. Let me know if you improve on this, it was
# pretty q&d.
#
# author: Ben Vandgrift <br/>
@chaserx
chaserx / Must Carry DTV Stations Lexington KY
Created January 3, 2010 17:11
DTV Stations without a Insight Communications cable box
DTV Stations without a Insight Communications cable box available over cable service
CBS 72-1
KET2 72-4
KET 72-13
TBS 73-1
WEA 73-2
ABC 81-1
FOX 112-2
DSC 115-2
@chaserx
chaserx / send_sms_by_email.rb
Created January 4, 2010 20:26
quick dirty gmail to txt msg
#!/usr/local/bin/ruby -wKU
require 'rubygems'
require 'gmail'
# Chase Southard
# 12.31.2009
# chase {dot} southard [at] gmail {dot} com
# requires ruby-gmail gem #=> http://dcparker.github.com/ruby-gmail/
development: &global_settings
database: textual_development
host: 127.0.0.1
port: 27017
test:
database: textual_test
<<: *global_settings
production:
$(function() {
// Github Repo JSON Endpoint
var endpoint = "http://github.com/api/v1/json/chaserx?callback=?";
$.fn.sort = function() {return this.pushStack(jQuery.makeArray([].sort.apply(this, arguments)));};
$.getJSON(endpoint, function(data) {
// Remove all the old projects!
$("#projects li").remove();
#!/usr/local/bin/ruby -wKU
# R. Chase Southard
# chase [dot] southard [at-thang] gmail [dot] com
# @southard
# 8.21.10
# from Code for America binary-art posters and shirt; http://codeforamerica.org/binary-art/
# Donate to Code for America at http://codeforamerica.org/donate or http://codeforamerica.org/gear
system:
system:
uname: "Darwin KilgoreLabMBP.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)"
zsh: "/bin/zsh => zsh 4.3.4 (i386-apple-darwin9.0)"
rvm:
version: "rvm 1.0.4 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"