Skip to content

Instantly share code, notes, and snippets.

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;"));
// Code for your custom functions file.
function aj_post_meta_below_title_right() {
?>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <g:plusone size="medium" href="<?php the_permalink(); ?>"></g:plusone>
<?php
}
add_filter('headway_post_meta_below_title_right', 'aj_post_meta_below_title_right');
/* Add this to the Scripts & Analytics section, either in the Header or Footer section */
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
@ajmorris
ajmorris / sample.html
Created July 1, 2011 17:54
Sample code for custom fields
<div class="vimeo-video">
<?php get_post_meta($post->ID, 'video-hightlight', true); ?>
</div>
@ajmorris
ajmorris / functions.php
Created December 21, 2011 21:28
Headway Child Theme functions.php file for adding a fluid header and footer
<?php
add_action('headway_html_open', 'aj_add_header');
function aj_add_header() {
echo '<div class="aj-header">Hello from the header!</div>';
}
add_action('headway_whitewrap_close', 'aj_add_footer');