I hereby claim:
- I am nathane on github.
- I am nathane (https://keybase.io/nathane) on keybase.
- I have a public key ASByU3CgpIKco5WnArzFLSe0IwXhG2U7edyc-Dhe5-bD9go
To claim this, I am signing this object:
#!/usr/bin/env php | |
<?php | |
echo "Running tests... "; | |
exec('vendor/bin/phpunit', $output, $returnCode); | |
if ($returnCode !== 0) { | |
// Show full output | |
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL; | |
echo "Cannot push changes untill all tests pass." . PHP_EOL; | |
exit(1); | |
} |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
I hereby claim:
To claim this, I am signing this object:
filter { throttle { before_count => 30 period => 60 add_tag => "chill-out" } }
output { if "chill-out" not in [tags] {
<?php | |
function autoLink($str, $attributes=array()) { | |
$attrs = ''; | |
foreach ($attributes as $attribute => $value) { | |
$attrs .= " {$attribute}=\"{$value}\""; | |
} | |
$str = ' ' . $str; | |
$str = preg_replace( | |
'`([^"=\'>])((http|https|ftp)://[^\s<]+[^\s<\.)])`i', | |
'$1<a href="$2"'.$attrs.'>$2</a>', |
<?php | |
\Blade::directive('var', function($expression) { | |
$segments = array_map(function($segment) { | |
return trim($segment); | |
}, explode(',', preg_replace("/[\(\)\\\"\']/", '', $expression))); | |
return '<?php $' . $segments[0] . " = '" . $segments[1] . "' ?>"; | |
}); |
(function (global){ | |
"use strict"; | |
var fabric=global.fabric||(global.fabric={}), | |
extend=fabric.util.object.extend, | |
clone=fabric.util.object.clone; | |
if(fabric.CurvedText){ | |
fabric.warn('fabric.CurvedText is already defined'); |
'use strict'; | |
var forEach = angular.forEach; | |
angular.module('ngTouchNav') | |
.config(function($animateProvider) { | |
$animateProvider.register('', ['$window','$sniffer', '$timeout', function($window, $sniffer, $timeout) { | |
var noop = angular.noop; |
/* | |
It was just an idea I had to help mitigate some ddos by having many servers and hiding the real ip of the server using this then we could monitor each one and filter or turn them off as needed etc. | |
*/ | |
var net = require('net'); | |
function ProxyServer(localport, remoteip, remoteport) { | |
if (remoteport === undefined) | |
remoteport = localport; | |
var server = net.createServer({ | |
allowHalfOpen : false, |