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
<VirtualHost *:80> | |
ServerAdmin __adminemail__ | |
ServerName __domain__ | |
ServerAlias __domainalias__ | |
DocumentRoot /var/www/__path__/ | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> |
<?php | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
<?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 |