Skip to content

Instantly share code, notes, and snippets.

Seth Ladd sethladd

View GitHub Profile
sethladd / sortings.dart
Created Mar 10, 2014
Experiments with sorting algorithms in Dart, from Wikipedia articles.
View sortings.dart
import 'dart:math';
void bubble(List list) {
var n = list.length;
while (n != 0) {
var newn = 0;
for (var i = 1; i < n; i++) {
if (list[i-1] > list[i]) {
sethladd / pubspec.yaml
Created Mar 24, 2014
dart:js and package:js test for code size
View pubspec.yaml
name: testjsinterop
description: A sample web application
browser: any
js: any
quiver: any
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
#core_header_panel {
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 '
You can’t perform that action at this time.