🏴☠️
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
<?php | |
/** | |
* PluginRoute class. | |
* | |
* Route class for plugins that allows you to clean up urls for plugins | |
* without tons of calls to Router::connect() to shorten controller names in urls. | |
*/ | |
class PluginRoute extends CakeRoute | |
{ |
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
require 'formula' | |
class Apc <Formula | |
url 'http://pecl.php.net/get/APC-3.1.4.tgz' | |
homepage 'http://php.net/manual/en/book.apc.php' | |
md5 '' | |
version '3.1.4' | |
def install | |
Dir.chdir "APC-#{version}" do |
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
/**********************************************/ | |
/* | |
/* Espresso-inspired theme for Google Chrome Inspector | |
/* | |
/* By: Paul Redmond http://github.com/paulredmond | |
/* | |
/* Inspired by Darcy Clarke's post - http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* Darcy Clarke's "Darker Skin" theme - http://darcyclarke.me/dev/inspectorskin/Custom.css | |
/* | |
/**********************************************/ |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
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
var util = require('util'), | |
exec = require('child_process').exec, | |
modules = {}, | |
// what to strip off the pathname (/my/dir/web becomes /web) | |
docroot = __dirname+'/webroot', | |
// where to search for YUI.add in files | |
path = __dirname+'/webroot/bundles', | |
file, | |
child; |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
OlderNewer