Install Homebrew - http://brew.sh/
Install Python via brew
brew install python
Check your Python version
<?php | |
function env($key, $default = null) | |
{ | |
$value = getenv($key); | |
if ($value === false) { | |
return value($default); | |
} | |
<?php | |
function wrapFunction(callable $func, array $params) | |
{ | |
try { | |
$data = $func(...$params); | |
} catch (\Exception $e) { | |
$data = false; | |
} | |
<?php | |
class HttpException extends \Exception | |
{ | |
/** | |
* List of additional headers | |
* | |
* @var array | |
*/ | |
private $headers = array(); |
Install Homebrew - http://brew.sh/
Install Python via brew
brew install python
Check your Python version
<?php | |
/** | |
* Function to redirect browser to a specific page | |
*/ | |
function redirect($url) | |
{ | |
if ( ! headers_sent() ) | |
{ | |
header('Location: '.$url); | |
} |
.columnflush(@x,@columns:@columns) { | |
display: inline; | |
float: left; | |
width: @total-width*((((@gutter-width+@column-width)*@x)) / @gridsystem-width); | |
} | |
.columnflushleft(@x,@columns:@columns) { | |
display: inline; | |
float: left; | |
width: @total-width*((((@gutter-width+@column-width)*@x)-(@gutter-width*.5)) / @gridsystem-width); |
// Wicked credit to | |
// http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bugs.html | |
var scrollElement = 'html, body'; | |
$('html, body').each(function () { | |
var initScrollTop = $(this).attr('scrollTop'); | |
$(this).attr('scrollTop', initScrollTop + 1); | |
if ($(this).attr('scrollTop') == initScrollTop + 1) { | |
scrollElement = this.nodeName.toLowerCase(); | |
$(this).attr('scrollTop', initScrollTop); | |
return false; |
<VirtualHost *:80> | |
ServerName __domain__ | |
ServerAlias __domainalias__ | |
DocumentRoot /Users/jjames/Sites/__folder__/ | |
<Directory /Users/jjames/Sites/__folder__/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny |
/* =WordPress Core | |
-------------------------------------------------------------- */ | |
@wpmarginright:5px 0 20px 20px; | |
@wpmarginleft:5px 20px 20px 0; | |
.alignnone { margin:@wpmarginleft; } | |
.aligncenter, | |
div.aligncenter { | |
display:block; |
tail -f /var/log/apache2/error.log |