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.
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' |
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 * * * |
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
A list of amazingly awesome PHP libraries, resources and shiny things.
#!/usr/bin/env bash | |
# Update the origin remote and prune it | |
updateOrigin() | |
{ | |
git fetch origin | |
git remote prune origin | |
} | |
# List branches that are merged into integration, but not master |
# | |
# 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 |
<?php | |
// Custom author URI structure even if the site | |
// is configured to use a custom structure, ie: /my-prefix/%postname%/ | |
add_filter('init', function () { | |
global $wp_rewrite; | |
$wp_rewrite->author_structure = '/' . $wp_rewrite->author_base. '/%author%'; | |
// Only uncomment the flush_rules() method call if things are not working. | |
// After the rules are flushed (refresh page), this can be commented out again. |
# models/comment.rb | |
class Comment < ActiveRecord::Base | |
belongs_to :commentable, polymorphic: true | |
validates :name, presence: true | |
end |
<?php | |
if ( | |
env('APP_DEBUG') === true | |
&& !preg_match('/(prd|production|prod)/', env('APP_ENV')) | |
) { | |
$app->get('_/phpinfo', function () { | |
ob_start(); | |
phpinfo(); | |
$response = ob_get_contents(); |
require 'formula' | |
class Pngout < Formula | |
url 'http://static.jonof.id.au/dl/kenutils/pngout-20110722-darwin.tar.gz' | |
homepage 'http://www.jonof.id.au/kenutils' | |
md5 'ce70a9d70e08b1920e5ac88d130d0eb9' | |
version '20110722' | |
def install | |
prefix.install Dir['*'] |