I hereby claim:
- I am madssj on github.
- I am madssj (https://keybase.io/madssj) on keybase.
- I have a public key whose fingerprint is A8FF F2C5 7038 93A4 1435 C4B1 E12B 4C53 E051 13A1
To claim this, I am signing this object:
# edit: i put this in a project called django-pipeline-ngmin-mixin-compressor | |
# which you should use | |
from pipeline.conf import settings | |
from pipeline.compressors.yuglify import YuglifyCompressor | |
from pipeline.compressors.uglifyjs import UglifyJSCompressor | |
class NgminMixIn(object): | |
""" |
/** Automaticly set the correct WP_HOME and WP_SITEURL based on HTTP_HOST */ | |
$absolute_url = "http" . ($_SERVER['HTTPS'] ? 's' : '') . "://{$_SERVER['HTTP_HOST']}"; | |
if ($_SERVER['HTTP_PORT'] != 80 || $_SERVER['HTTP_PORT'] != 443) { | |
$absolute_url .= "{$_SERVER['HTTP_PORT']}"; | |
} | |
define('WP_HOME', $absolute_url); | |
define('WP_SITEURL', $absolute_url); |
if has('vim_starting') | |
if &compatible | |
set nocompatible | |
endif | |
set runtimepath+=/Users/mads/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#begin(expand('/Users/mads/.vim/bundle')) |
The new mirror selector doesn't work without the traling slash. | |
➜ ~ curl -iH 'Host: httpredir.debian.org' 5.153.231.35/debian/ | |
HTTP/1.1 302 Found | |
Date: Wed, 22 Jul 2015 14:22:21 GMT | |
Location: http://mirror.easyspeedy.com/debian/ | |
Content-Type: text/plain | |
X-Clacks-Overhead: GNU Terry Pratchett |
I hereby claim:
To claim this, I am signing this object:
def get_random_name(): | |
""" | |
Return a random proper name in a somewhat efficient way. | |
""" | |
fp = open("/usr/share/dict/propernames") | |
fp.seek(0, 2) | |
size = fp.tell() | |
fp.seek(0) | |
fp.seek(int(random.random() * size * 0.95)) |
#include <openssl/ssl.h> | |
int main(int argc, char **argv) { | |
return 0; | |
} |
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json|grep -B 2 CLOUDFRONT|grep -oE "\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}\b" |
var a:XML = <request command="run-command" />; | |
var r:URLRequest = new URLRequest("http://localhost/service.php"); | |
r.data = a; | |
r.method = URLRequestMethod.POST; | |
r.contentType = "text/xml"; | |
var l:URLLoader = new URLLoader(); | |
l.addEventListener(Event.COMPLETE, function(e:Event) { | |
trace("success", l.data); |
#!/bin/sh | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: $0 <postgresql sql dump> <db_name>" >&2 | |
exit 1 | |
fi | |
db_file=$1 | |
db_name=$2 |