Skip to content

Instantly share code, notes, and snippets.

View andypearson's full-sized avatar

Andy Pearson andypearson

View GitHub Profile
# Using Filter branch to remove a file from entire repository history
git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD
rm -r .git/refs/original
/*
Name: Reset CSS
Author: Eric Meyer
URI: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
%y%m%d-__DB__
%y%m%d-__DB__-__TABLE__
<?php
/*
* Database Class
* Created by - Andy Pearson
* Date - 20.02.07
*/
class db
{
Last login: Mon Jan 26 18:53:57 on console
Captain-Dread:~ andypearson$ cd 0working/github
Captain-Dread:github andypearson$ rails formtastic_example
create
create app/controllers
create app/helpers
...
...
Captain-Dread:github andypearson$ cd formtastic_example
Captain-Dread:formtastic_example andypearson$ script/plugin install git://github.com/justinfrench/formtastic.git
@andypearson
andypearson / Useful Commands
Created January 24, 2009 12:53
A whole bunch of useful commands which I can never remember or am too lazy to type
# Edit the Hosts file on OSX (I always forget this...)
mate /private/etc/hosts
# Run cucumber and rspec using autotest
AUTOFEATURE=true autospec
# Install Rails BDD Suite
sudo gem install rspec rspec-rails cucumber webrat
# Update Rails
<?php
// Heredoc Syntax
// For more info: http://us3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
echo <<<EOT
This is a block of text.
EOT;
// Breaking PHP tags