A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
require 'rubygems' | |
require 'railsless-deploy' | |
load 'config/deploy' |
# | |
# After running cap deploy:cold, You'll need to remove all files from the | |
# domains/yourdomain.com/html directory and turn the html directory into a | |
# symlink that links to ./current which is also a symlink setup by capistrano. | |
# | |
# install the mt-capistrano gem, not sure if it is really needed in most situations | |
require 'mt-capistrano' | |
# Configure these |
A list of amazingly awesome PHP libraries, resources and shiny things.
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
traceroute yui.yahooapis.com | |
traceroute to fo-anyycs-l.ay1.b.yahoodns.net (216.115.97.236), 64 hops max, 52 byte packets | |
1 192.168.8.1 (192.168.8.1) 0.620 ms 0.356 ms 0.461 ms | |
2 10.81.224.1 (10.81.224.1) 6.282 ms 7.849 ms 11.538 ms | |
3 ip68-2-4-37.ph.ph.cox.net (68.2.4.37) 11.341 ms 6.473 ms 5.649 ms | |
4 70.169.75.118 (70.169.75.118) 10.828 ms 12.486 ms 7.519 ms | |
5 mcdldsrj01-ae2.0.rd.ph.cox.net (70.169.76.225) 6.506 ms 9.685 ms 5.624 ms | |
6 langbprj01-ae1.rd.la.cox.net (68.1.1.13) 22.028 ms 99.789 ms 23.220 ms | |
7 exchange-cust1.la1.equinix.net (206.223.123.16) 27.044 ms 31.842 ms 46.361 ms | |
8 * * * |
<?php | |
$birthday = '01/01/1970'; | |
$age = DateTime::createFromFormat('m/d/Y', $birthday) | |
->diff(new DateTime('now')) | |
->y; |
alias mongo.start="mongod run --config `brew --prefix mongodb`/mongod.conf" | |
alias apache.start="sudo /usr/sbin/apachectl start" | |
alias apache.stop="sudo /usr/sbin/apachectl stop" | |
# alias cake="${dev}/framework/cake/console/cake" | |
alias cakephp="${dev}/framework/cake/console/cake" | |
alias run.elasticsearch='elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.18.5/config/elasticsearch.yml' |
function isRetina(){ | |
return (('devicePixelRatio' in window && devicePixelRatio > 1) || | |
('matchMedia' in window && matchMedia("(-moz-device-pixel-ratio:1.0)").matches)) | |
} |
WHITE="\[\033[00m\]" | |
BLACK="\[\033[01;30m\]" | |
RED="\[\033[0;31m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
GREEN="\[\033[0;32m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
PURPLE="\[\033[0;35m\]" | |
CYAN="\[\033[0;36m\]" |
<?php | |
class TimeoutException extends RuntimeException {} | |
class Timeout | |
{ | |
private $active; | |
public function set($seconds) | |
{ |