Skip to content

Instantly share code, notes, and snippets.

@SethWilson
SethWilson / git-setup.sh
Created August 16, 2011 21:06
Git setup niceties
# via https://gist.github.com/419201#file_gitconfig.bash
# Install (from Matt's gist) these useful Git aliases & configurations with the following command:
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash)
git config --global color.ui auto # colorize output (Git 1.5.5 or later)
git config --global color.interactive auto # and from 1.5.4 onwards, this will works:
echo "Set your name & email to be added to your commits."
echo -n "Please enter your name: "
@SethWilson
SethWilson / mails.sh
Created September 12, 2011 20:30 — forked from nikcub/mails.sh
Send email with Mail.app from command line script
#!/bin/sh
/usr/bin/osascript > /dev/null <<ASCPT
set stdinText to "$(cat | sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g')"
set recName to "Nik Cubrilovic"
set recAddr to "[email protected]"
set theSubject to "Email from standard input"
tell application "Mail"
@SethWilson
SethWilson / gist:1277194
Created October 11, 2011 03:23 — forked from jasoncodes/gist:1223731
Installing Ruby 1.9.2 with rbenv
brew install --HEAD rbenv
brew install --HEAD ruby-build
brew install --HEAD https://raw.github.com/jasoncodes/homebrew/rbenv-vars/Library/Formula/rbenv-vars.rb # https://github.com/mxcl/homebrew/pull/7891
brew install readline
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'gem() { rbenv exec gem "$@" && rbenv rehash && hash -r; }' >> ~/.bash_profile
exec
CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.2-p290
rbenv global 1.9.2-p290
gem install bundler -v '~> 1.0.pre'
@SethWilson
SethWilson / complete_checkout.js
Created February 23, 2012 21:51
Complete Checkout
/**
* complete_checkout.js
*
* This little bookmarklet populates the checkout screen with default values
*
* MIT Licensed.
*
* Copyright 2011-2012 Seth Wilson @SethWilson
*
* ------------------------------------------------
@SethWilson
SethWilson / lb_debug_info.js
Created February 24, 2012 19:16
LabelBuilder Debug info pane bookmarklet
/**
* lb_debug_info.js
*
* This little bookmarklet populates the LabelBuilder screen with a handy debug pane that shows the details of certain hidden fields
*
* MIT Licensed.
*
* Copyright 2011-2012 Seth Wilson @SethWilson
*
* ------------------------------------------------
@SethWilson
SethWilson / sw-bm-request-complete.js
Created March 7, 2012 15:35
Request Tracker: Complete as per Request
function runthis() {
// Completed as per request bookmarklet
$('#status').val('9');
$('select[name="resolution"]').val('10');
$('#notification_all').click();
$('textarea[name="reason"]').val('Complete as per request');
$("form[name=close_form]").submit();
@SethWilson
SethWilson / sw-bm-wontfix.js
Created March 7, 2012 15:38
Request Tracker: Won't Fix bookmarklet
function runthis() {
// Won't fix request bookmarklet
$('#status').val('9');
$('select[name="resolution"]').val('10');
$('#notification_all').click();
$('textarea[name="reason"]').val('Sorry - won't fix this');
$("form[name=close_form]").submit();
@SethWilson
SethWilson / sw-bm-request-close-links.js
Created March 7, 2012 16:42
Request Tracker: Add close links to listing page
@SethWilson
SethWilson / sabreskedextract.js
Created August 20, 2012 13:38
Sabres Schedule to Google Calendar
var sked_data = '';
$('#div_content').append('<textarea id="skeddata" />');
$('table#ctl00_ctl00_ContentPlaceHolder1_MainContentPlaceHolder_GridView1_RadGrid1_ctl00 tr').each(function(){
sked_data =
$(this).find("td:eq(8)").html() + ", " +
$(this).find("td:eq(3)").html() + ", " +
$(this).find("td:eq(4)").html() + ", " +
$(this).find("td:eq(3)").html() + ", " +
@SethWilson
SethWilson / sabreskedextract.js
Created August 20, 2012 13:43
Sabres Schedule to Google Calendar
var sked_data = '';
var sked_header = "Subject,Start Date,Start Time,End Date,End Time,All Day Event,Description,Location,Private";
$('#div_content').append('<textarea id="skeddata" />');
$('#skeddata').append(sked_header + '\n');
$('table#ctl00_ctl00_ContentPlaceHolder1_MainContentPlaceHolder_GridView1_RadGrid1_ctl00 tr').each(function(){
sked_data =
$(this).find("td:eq(8)").html() + ", " +
$(this).find("td:eq(3)").html() + ", " +