Skip to content

Instantly share code, notes, and snippets.

@damien-biasotto
damien-biasotto / docker-compose.yml
Created October 10, 2015 12:53
Croogo3 Docker
web:
image: occitech/cakephp:5-apache
ports:
- 80
links:
- db
- mail
volumes:
- .:/var/www/html
environment:
@AmyStephen
AmyStephen / PSR-0 and Composer.md
Last active December 12, 2015 10:09
Documentation of how the environment and how utilizing Composer parameters and the package repository structure, itself, impact the installation path and provide options for how best to implement the PSR-0 for your package.

PSR-0 and Composer

It's helpful to understand how Composer works and how to best utilize the environment as you implement your PSR-0 Namespace. There are factors that you, where you, as a user of the environment, will not be able to change and you should be aware of those points. There are areas where your choices directly impact the folder path and the implementation of your namespace.

##1. Composer Name Parameter##

The first data relevant to the package install path is the name you provide to Composer.

###What is the purpose of the name parameter?###

@kennethreitz
kennethreitz / pr.md
Created September 12, 2012 20:56 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jrbasso
jrbasso / pre-commit
Created March 31, 2012 21:54
Pre commit hook for CakePHP
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
echo "Checking PHP Lint..."
FILES=""
for FILE in `git diff --cached --name-only --diff-filter=ACMR HEAD | egrep \\\\.\(php\|ctp\)\$`
do
php -l -d display_errors=0 $PROJECT/$FILE
if [ $? != 0 ]
@ceeram
ceeram / .travis.yml
Created March 14, 2012 19:02
Travis configuration file for CakePHP, add to the root of the repo.
language: php
php:
- 5.3
- 5.4
env:
- DB=mysql
- DB=pgsql
- DB=sqlite
@dogmatic69
dogmatic69 / git-svn-post-import.php
Last active September 28, 2015 10:09
After running git svn clone, handy little script that will create all the correct branches and tags for the repo
#!/usr/bin/php5
<?php
$branches = array_filter(explode("\n", `git branch -r`));
`clear`;
foreach((array)$branches as $branch) {
echo sprintf("Working on %s\n======================================\n\n", $branch);
$commands = array();
$branch = trim($branch);
if(empty($branch)) {