This file contains 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
# BEGIN WordPress | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# GTA Member Profiles | |
RewriteRule ^gta-member-profile/(.+) member-profile/?name=$1 [L] | |
# uploaded files | |
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] |
This file contains 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
using System; | |
using Microsoft.Practices.Unity; | |
using Oasis.DataModel; | |
using Oasis.Repository.Interfaces; | |
using Oasis.Presentation.Events; | |
using Oasis.Foundation.Events; | |
using Oasis.Presentation.ViewModels; | |
using Oasis.Presentation.Modules; | |
namespace Oasis.Presentation.ViewModels |
This file contains 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
namespace :load do | |
ZIP_CODE_DATA_URL = 'http://www.census.gov/tiger/tms/gazetteer/zips.txt' | |
# Swiped from ActiveRecord migrations.rb | |
def announce(message) | |
length = [0, 75 - message.length].max | |
puts "== %s %s" % [message, "=" * length] | |
end |
This file contains 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
def parse_statuses status_lst | |
# Create a placeholder list | |
big_list = [] | |
# pop the first status onto that list so we don't have to test for nil every time | |
big_list << status_lst.pop | |
# loop through each status and... | |
status_lst.each do |stat| | |
# Check to see if the last item is an array (a group) or just a status and hold | |
# onto it for comparison | |
last_stat = big_list.last.class == Array ? big_list.last.last : big_list.last |
This file contains 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
john@boudica:~/Dev/Ruby/rebase_workflow$ git push -u origin master | |
Counting objects: 3, done. | |
Writing objects: 100% (3/3), 205 bytes, done. | |
Total 3 (delta 0), reused 0 (delta 0) | |
To git@github.com:mettadore/rebase_workflow.git | |
* [new branch] master -> master | |
Branch master set up to track remote branch master from origin. | |
john@boudica:~/Dev/Ruby/rebase_workflow$ git checkout -b branch1 | |
Switched to a new branch 'branch1' |
This file contains 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
#!/bin/bash | |
# From: http://snippets.freerobby.com/post/491644841/remove-merged-branches-in-git | |
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
if [ "$current_branch" != "master" ]; then | |
echo "WARNING: You are on branch $current_branch, NOT master." | |
fi | |
echo "Fetching merged branches..." | |
git remote prune origin | |
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$") |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
This file contains 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
Failures: | |
1) Admin::CustomersController when logged in as an administrator when logging in as a Customer by ID logs in as the customer | |
Failure/Error: controller.should_receive( :sign_in ).with( @customer ) | |
#<Admin::CustomersController:0x007f90e2053438> received :sign_in with unexpected arguments | |
expected: () | |
got: () | |
# ./spec/controllers/admin/customers_controller_spec.rb:79:in `block (4 levels) in <top (required)>' | |
2) Admin::ProductsController when logged in as an administrator when updating limited run products when a limited run category exists saves the limited run category to clear the cache |
This file contains 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
# Current pattern | |
class Coolness | |
def do_something_cool *args | |
opts = args.extract.options! | |
opts.assert_valid_keys(:when, :where) | |
#optionally set defaults | |
params[:when] = Time.now if params[:when].nil? |
This file contains 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
common: &common | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 | |
username: <UNAME> | |
password: <PWORD> | |
development: | |
<<: *common | |
database: ms_prod_dev |