This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' | |
############################################################################## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Merb Stack Authentication Setup | |
# create your app | |
$ merb-gen app authentication_app | |
$ cd authentication_app | |
# migrate the default user model | |
$ rake db:auto_migrate | |
# create a user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem list dm | grep dm | cut -d ' ' -f 1,7 | xargs sudo gem uninstall -Ia | |
gem list do | grep do | cut -d ' ' -f 1,7 | xargs sudo gem uninstall -Ia | |
gem list merb | grep merb | cut -d ' ' -f 1,7 | xargs sudo gem uninstall -Ia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem uninstall -Ia dm-adjust && sudo gem uninstall -Ia dm-aggregates && sudo gem uninstall -Ia dm-ar-finders && sudo gem uninstall -Ia dm-cli && sudo gem uninstall -Ia dm-constraints && sudo gem uninstall -Ia dm-core && sudo gem uninstall -Ia dm-couchdb-adapter && sudo gem uninstall -Ia dm-is-list && sudo gem uninstall -Ia dm-is-nested_set && sudo gem uninstall -Ia dm-is-state_machine && sudo gem uninstall -Ia dm-is-tree && sudo gem uninstall -Ia dm-migrations && sudo gem uninstall -Ia dm-more && sudo gem uninstall -Ia dm-observer && sudo gem uninstall -Ia dm-querizer && sudo gem uninstall -Ia dm-rest-adapter && sudo gem uninstall -Ia dm-serializer && sudo gem uninstall -Ia dm-shorthand && sudo gem uninstall -Ia dm-sweatshop && sudo gem uninstall -Ia dm-timestamps && sudo gem uninstall -Ia dm-types && sudo gem uninstall -Ia dm-validations && sudo gem uninstall -Ia do_sqlite3 && sudo gem uninstall -Ia merb-action-args && sudo gem uninstall -Ia merb-assets && sudo gem uninstall -Ia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem uninstall -Ia dm-adjust && sudo gem uninstall -Ia dm-aggregates && sudo gem uninstall -Ia dm-ar-finders && sudo gem uninstall -Ia dm-cli && sudo gem uninstall -Ia dm-constraints && sudo gem uninstall -Ia dm-core && sudo gem uninstall -Ia dm-couchdb-adapter && sudo gem uninstall -Ia dm-is-list && sudo gem uninstall -Ia dm-is-nested_set && sudo gem uninstall -Ia dm-is-state_machine && sudo gem uninstall -Ia dm-is-tree && sudo gem uninstall -Ia dm-migrations && sudo gem uninstall -Ia dm-more && sudo gem uninstall -Ia dm-observer && sudo gem uninstall -Ia dm-querizer && sudo gem uninstall -Ia dm-rest-adapter && sudo gem uninstall -Ia dm-serializer && sudo gem uninstall -Ia dm-shorthand && sudo gem uninstall -Ia dm-sweatshop && sudo gem uninstall -Ia dm-timestamps && sudo gem uninstall -Ia dm-types && sudo gem uninstall -Ia dm-validations && sudo gem uninstall -Ia do_sqlite3 && sudo gem uninstall -Ia merb-action-args && sudo gem uninstall -Ia merb-assets && sudo gem uninstall -Ia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aggregator' | |
require 'showcase' | |
merb_feeds = Aggregator.new( [ | |
'http://yehudakatz.com/feed/', | |
'http://feedproxy.feedburner.com/crazycool', | |
'http://www.merbing.com/articles.rss', | |
'http://blog.merbivore.com/articles.rss', | |
'http://merbist.com/feed/', | |
'http://feeds.feedburner.com/gweezlebur', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter Cleanup | |
// @namespace Scrossics | |
// @description Clean up Twitter's new "promotion" area | |
// @include https://twitter.com/* | |
// @include http://twitter.com/* | |
// ==/UserScript== | |
var divs = document.getElementsByTagName("div"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "expensetracker" | |
set :deploy_to, "/home/dh_username/#{application}" | |
set :scm, :git | |
set :use_sudo, false | |
set :repository, "[email protected]:bradly/#{application}.git" | |
set :branch, "master" | |
set :deploy_via, :remote_cache | |