Skip to content

Instantly share code, notes, and snippets.

Seth Ladd sethladd

View GitHub Profile
sethladd / gist:44830
Created Jan 8, 2009
example ruby and libxml code
View gist:44830
require 'rubygems'
require 'libxml'
doc = LibXML::XML::Document.file('test.xml')
rs = doc.find('//R')
rs.each do |r|
u = r.find_first('U')
s = r.find_first('S')
puts "S: #{s} and U: #{u}"
rs = nil
sethladd / gist:90690
Created Apr 6, 2009
load two files via Pig and join them
View gist:90690
people = LOAD 'people' USING PigStorage(',') AS (ssn,date,uic);
medical_cases = LOAD 'medical_cases' USING PigStorage(',') AS (ssn,data,icd9);
joined = JOIN people BY ssn , medical_cases BY ssn;
STORE joined INTO 'out' USING PigStorage(',');
View gist:104210
~/Development/dses-rails-2.2.2/dses2 $ svn diff
Index: vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb
--- vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb (revision 18159)
+++ vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb (working copy)
@@ -1043,7 +1043,7 @@
END as is_identity
sethladd / gist:119039
Created May 28, 2009 — forked from dburger/gist:118842
create a new bare shared git repository
View gist:119039
mkdir -p /var/data/repos/myrepo.git
cd /var/data/repos/myrepo.git
git --bare init --shared=group
View display git branch on
parse_git_branch (){
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
export PS1='\[\033[0;33m\]\w\[\033[00m\]\[\033[01;00m\]$(parse_git_branch): '
sethladd / check_wordpress_blogger_links.rb
Created Mar 10, 2010
Migrate from Wordpress to Blogger
View check_wordpress_blogger_links.rb
sethladd / .bash_profile
Created Mar 14, 2010 — forked from aeden/gist:331864
View .bash_profile
export PATH=$PATH:/Users/sladd/.gem/ruby/1.8/bin
alias gst='git status '
alias gc='git commit '
alias gca='git commit -a '
alias ga='git add '
alias gco='git checkout '
alias gb='git branch '
alias gm='git merge '
alias gp='git push '
View chrome web store license respone.json
"kind": "chromewebstore#license",
"id": "ejbknjbccnnccddiljheadjafeeagcan/\u003dAItOawlh_ZYIBQi-kNV-d3Rd8WIjQEBsLDh5LDQ",
"appId": "ejbknjbccnnccddiljheadjafeeagcan",
"userId": "\u003dAItOawlh_ZYIBQi-kNV-d3Rd8WIjQEBsLDh5LDQ",
"result": "YES",
"accessLevel": "FREE_TRIAL"
sethladd / manifest.json
Created Oct 28, 2010
A manifest for a packaged bare-bones Flash app for the Chrome Web Store. As simple as it gets.
View manifest.json
"name": "YOUR APP NAME",
"description": "YOUR APP DESCRIPTION",
"version": "1",
"app": {
"launch": {
"local_path": "index.html"
"icons": {
sethladd / manifest.json
Created Oct 28, 2010
An example manifest.json for a Hosted Flash Web App.
View manifest.json
"name": "Chrome is Glowing",
"description": "Try to take your eyes off of the glowing Chrome orb.",
"version": "1",
"app": {
"urls": [
"launch": {
"web_url": ""
You can’t perform that action at this time.