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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'bling/vim-airline' | |
Plugin 'kien/ctrlp.vim' |
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 | |
App::uses('AuthComponent', 'Controller/Component'); | |
class AuthExtensionComponent extends AuthComponent { | |
// AuthExtension Notes | |
// This will override default routines of AuthComponent | |
// `$this->Auth->user()` as per the default will return as an array | |
// `$this->user()` is modified to only contain `Account.id` |
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
import commands | |
import platform | |
import os.path | |
# Check distribution | |
distro = platform.linux_distribution()[0] | |
# Find out distribution we're on (version and architecture wouldn't matter) | |
if distro == 'Ubuntu': | |
httpServices = ['apache2', 'nginx'] |
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 | |
class foo { | |
protected $registry = []; | |
public function __construct() | |
{ | |
$that = $this; | |
$containers = [ |
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 | |
if( ! preg_match('/^'.Config::get('app.domain').'$/', Request::server('HTTP_HOST')) ) { | |
// Setup the host | |
$host = Request::server('HTTP_HOST'); | |
$domain = preg_replace('/^www\./', '', $host); | |
// Setup domain configuration | |
Config::set('app.url', 'http://' . $host); |
NewerOlder