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 | |
/** | |
* Check any HTTPS URL to validate it | |
* | |
* - checkdomain verifies the SSL cert only (working, slow) | |
* - checkcurl verifies the URL can be loaded via CURL (not working) | |
* | |
*/ | |
App::uses('HttpSocket', 'Utility'); |
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
In this example, I am scanning for all of these classes | |
https://github.com/awatson1978/clinical-ui-vocabulary/ |
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
# ----------------------------¬ | |
# Proxy config/example | |
# (optional config used inside server/location blocks)¬ | |
# context - server, location¬ | |
# link: http://wiki.nginx.org/HttpProxyModule#proxy_cache¬ | |
# link: http://nginx.org/en/docs/http/ngx_http_proxy_module.html¬ | |
# link: http://nginx.org/en/docs/http/ngx_http_upstream_module.html | |
# link: http://www.packtpub.com/article/using-nginx-reverse-proxy¬ | |
# ----------------------------¬ |
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 | |
/** | |
* pluck out a value from a nested array, based on a $path | |
* where $path is a single-dim list of keys. | |
* | |
* @param array $form (multi-dim) | |
* @param array $path (single dim) | |
* @reutrn mixed $value from $form, in $path |
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
; 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
# | |
# 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(.*)$ { |