class CoffeeSheetsExampleBaseClass extends CoffeeSheetStyleSheet {
This will execute on every page load generating beautiful styles for all!
public void main () {
<?php | |
/** | |
* See if it's an autoreply | |
* $message is of type Zend_Mail_Message | |
*/ | |
$autoreply = false; | |
try { | |
if ($message->{'X-Autoreply'}) { | |
$autoreply = true; | |
} |
<?php | |
/** | |
* Peeks at the first element of an array. Optionally returns the first key | |
* if the 2nd parameter is set to true. | |
* | |
* @param Array $arr | |
* @param Boolean $returnKey | |
* @return Mixed $val | |
*/ | |
function array_peek($arr, $key = false) { |
function phplint() { | |
for f in `ls *.php` | |
do | |
php -l ${f} | |
done | |
} | |
function rphplint() { | |
for f in `find . -iname '*.php'` | |
do |
#!/bin/bash | |
# searches for php files. change find command to change what it searches for. | |
function loc() { | |
tloc=0 | |
for f in `find . -iname '*.php'` | |
do | |
cloc=`wc -l ${f}` | |
tloc=$((${tloc} + `echo ${cloc} | cut -d' ' -f1`)) | |
echo ${cloc} |
#!/bin/bash | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install build-essential php5 apache2 mysql-server git vim python-software-properties nodejs npm ruby-sass php5-mysql | |
sudo npm install -g requirejs | |
sudo a2enmod rewrite |
Set textwidth to 80, move to the start of the file (can be done with Ctrl-Home or gg), and type gqG. | |
gqG formats the text starting from the current position and to the end of the file. It will automatically join consecutive lines when possible. You can place a blank line between two lines if you don't want those two to be joined together. | |