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
find: | |
(\"[^,\n\"\'\(]+\"|\'[^,\n\"\'\(]+\'|\$[a-zA-Z0-9\_\-\>]+|[0-9]+|\'\'|\"\"|null|false|true|\)|\]|\/[a-z]*),([a-zA-Z0-9\'\"\$\)\(\[]) | |
replace: | |
$1, $2 | |
find: | |
(\"[^,\n\"\'\(]+\"|\'[^,\n\"\'\(]+\'|\$[a-zA-Z0-9\_\-\>]+|[0-9]+|\'\'|\"\"|null|false|true|\)|\]|\/[a-z]*)=>([a-zA-Z0-9\'\"\$\)\(\[]) | |
replace: |
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
[user] | |
name = alan bount | |
email = alan@zeroasterisk.com | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow |
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
public function isCta($user=null) { | |
if (isset($user['MemberCta']['is_active'])) { | |
return (!empty($user['MemberCta']['is_active'])); // fast if easy | |
} | |
if (is_numeric($user) && !empty($user)) { | |
if (isset($this) && is_object($this->Member)) { | |
$user = $this->find('first', array('contain' => array('MemberCta'), 'conditions' => array('Member.id' => $user))); | |
} else { | |
$MemberCta =& ClassRegistry::init('Member')->find('first', array('contain' => array('MemberCta'), 'conditions' => array('Member.id' => $user))); | |
} |
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
# | |
# These are standard location configs which should be setup in all CakePHP apps | |
# basic php functionality | |
# basic document resolution configuration | |
# basic security | |
# basic optimization | |
# | |
#PHP Magic | |
location ~ \.php(.*)$ { |
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
# Example CakePHP App config | |
server { | |
listen 80; | |
server_name domain.com www.domain.com asset.domain.com; | |
access_log /var/log/nginx/domain.access.log main; | |
error_log /var/log/nginx/domain.errors.log info; | |
root /var/www/prod/domain/app/webroot; | |
index index.php index.html index.htm; | |
include standard_location_config_cakephp; |
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
; Start a new pool named 'www'. | |
[www] | |
listen = /var/run/php5-fpm.socket | |
listen.owner = www-data | |
listen.group = www-data | |
listen.mode = 0666 | |
user = www-data |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="alanpeabody" | |
#ZSH_THEME="dieter" | |
#ZSH_THEME="eastwood" |
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
#!/bin/bash | |
# ----------------------------------------------------------- | |
# @requires confirm.sh in the same location as this script | |
# @link http://wuhrr.wordpress.com/2010/01/13/adding-confirmation-to-bash/ | |
# ----------------------------------------------------------- | |
# usage: | |
# git rmbranch branchname [branchname ...] | |
# will force delete N number of branches locally and on origin | |
SCRIPT="$(readlink -nf ${0#./})" |
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
# ====================================================================== | |
# | |
# @link http://wuhrr.wordpress.com/2010/01/13/adding-confirmation-to-bash/#comment-3540 | |
# | |
# Function: confirm | |
# Asks the user to confirm an action, If the user does not answer yes, | |
# then the script will immediately exit. | |
# | |
# Parameters: | |
# $@ - The confirmation message |
OlderNewer