Skip to content

Instantly share code, notes, and snippets.

Merb::BootLoader.after_app_loads do
dependency 'merb-builder'
# This will get executed after your app's classes have been loaded.
end
### .bash_profile
export EDITOR='mate -w'
export VISUAL='mate -w'
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
def years_of_service
((Date.today - adjusted_start_date).to_i / 365.25).to_i
end
# .autotest
require 'autotest/redgreen'
require 'autotest/menu'
# This replaces the stock Autotest::Growl
module Autotest::Growl
def self.growl title, msg, image=nil, pri=0
title += " in #{Dir.pwd}"
msg += " at #{Time.now}"
system "growlnotify -n autotest --image #{image || "/Applications/Mail.app/Contents/Resources/Caution.tiff"} -m #{msg.inspect} -t #{title}"
end
Scenario: A user enters an annual request that passes over a holiday
Given an employee wants a request with '7 Apr 2009' to '9 Apr 2009'
And the request passes over a 'blackoutperiod'
And the employee sets the leave type to 'annual'
When the request status is changed to 'approved'
Then I should have '0' hours for my leave request
Given /^an employee wants a request with '(.*)' to '(.*)'$/ do |sdate, edate|
@user = Factory.build(:user, :id => "1")
<Directory "/Users/ajmorris/Sites">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#Begin WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#End WordPress
<?php
/**
* The template for displaying Search Results pages.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<?
/*
Plugin Name: Headway Skin: OnDemand Skin
Plugin URI: http://press75.com
Description: This is a port of the theme OnDemand from Press75
Author: AJ Morris
Version: 1.0
Author URI: http://ajmorris.org
*/
@ajmorris
ajmorris / Remove WordPress Version.php
Created January 4, 2011 20:59
Add this snippet to your theme's functions.php file to remove the version of WordPress your site/blog is running
add_filter('the_generator', create_function('$wpv', "return null;"));