Skip to content

Instantly share code, notes, and snippets.

View bradly's full-sized avatar

Bradly Feeley bradly

View GitHub Profile
#!/usr/bin/env ruby
@paths_to_verify = ['./app', './lib']
def check_dir_syntax(dir)
dir.each do |f|
next if f =='.' || f == '..'
path = File.join(dir.path, f)
if File.directory?(path)
#!/usr/bin/ruby
require 'rubygems'
require 'nokogiri'
AUTHOR = 'Bradly Feeley'
PROJECT_PATH = '~/www/digitaria-ddp/'
commit_format = "<commit id='%h' date='%ct' author='%an'>%n %s%n</commit>%n%n"
:partition => lambda {|a| "#{a.partitioned_id.join('/')}/v#{a.original.version}" },
def rename_file; return; end
def destroy_file; return; end
select * from html where url="http://www.mobilegeographics.com:81/locations/5538.html"
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
if @hotel.name == 'Hilton' and self.wants?(:internet)
@hotel.legnth_of_stay.times do
@hotel.cost += 13.99
end
end
#.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