Skip to content

Instantly share code, notes, and snippets.

View bradly's full-sized avatar

Bradly Feeley bradly

View GitHub Profile
@bradly
bradly / gist:16841
Created October 15, 2008 02:39 — forked from cilquirm/gist:16840
#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
require 'fileutils'
require 'yaml'
# Important - don't change this line or its position
MERB_THOR_VERSION = '0.0.5'
##############################################################################
27/27 100
26/27 96
25/27 93
24/27 89
23/27 85
22/27 81
21/27 78
20/27 74
19/27 70
18/27 67
function parse_git_branch {
[ -d .git ] || return 1
git_status="$(git status 2> /dev/null)"
branch_pattern="^# On branch ([^${IFS}]*)"
remote_pattern="# Your branch is (.*) of"
diverge_pattern="# Your branch and (.*) have diverged"
if [[ ! ${git_status}} =~ "working directory clean" ]]; then
state="*"
fi
# add an else if or two here if you want to get more specific
#.Xmodmap
! Switch caps lock and (left) control
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
if @hotel.name == 'Hilton' and self.wants?(:internet)
@hotel.legnth_of_stay.times do
@hotel.cost += 13.99
end
end
function parse_git_branch {
[ -d .git ] || return 1
git_status="$(git status 2> /dev/null)"
branch_pattern="^# On branch ([^${IFS}]*)"
remote_pattern="# Your branch is (.*) of"
diverge_pattern="# Your branch and (.*) have diverged"
if [[ ! ${git_status}} =~ "working directory clean" ]]; then
state="*"
fi
// ==UserScript==
// @name Twitter Cleanup
// @namespace BradlyFeeley
// @description Clean up Twitter's "promotion" area and trending topics
// @include http://twitter.com*
// @include http://www.twitter.com*
// @include https://twitter.com*
// @include https://www.twitter.com*
// ==/UserScript==
// ==UserScript==
// @name Twitter Cleanup
// @namespace BradlyFeeley
// @description Clean up Twitter's "promotion" area and trending topics
// @include http://twitter.com*
// @include http://www.twitter.com*
// @include https://twitter.com*
// @include https://www.twitter.com*
// ==/UserScript==
function parse_git_branch {
[ -d .git ] || return 1
git_status="$(git status 2> /dev/null)"
branch_pattern="^# On branch ([^${IFS}]*)"
remote_pattern="# Your branch is (.*) of"
diverge_pattern="# Your branch and (.*) have diverged"
if [[ ! ${git_status}} =~ "working directory clean" ]]; then
state="*"
fi
select * from html where url="http://www.mobilegeographics.com:81/locations/5538.html"