Skip to content

Instantly share code, notes, and snippets.

View cbandy's full-sized avatar

Chris Bandy cbandy

View GitHub Profile
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)
@cbandy
cbandy / gist:1360674
Last active September 28, 2015 01:07
git pre-commit hook
#!/bin/sh
# Run tools on files in the index
git diff --cached --name-status \
| awk '$1 != "D" && $1 != "R" { $1 = ""; print }' \
| git checkout-index --stdin --temp \
| while read tmp orig
do
case $orig in
*.php)
@johnwards
johnwards / MessageLogger.php
Created August 1, 2011 11:14
Testing Swiftmailer in a Silex app
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')