I hereby claim:
- I am benregn on github.
- I am benregn (https://keybase.io/benregn) on keybase.
- I have a public key whose fingerprint is 0D4F F338 0C88 7158 9531 B19F 431B 09EB F2B6 430A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
['log', 'warn'].forEach(function(method) { | |
var old = console[method]; | |
console[method] = function() { | |
var stack = (new Error()).stack.split(/\n/); | |
// Chrome includes a single "Error" line, FF doesn't. | |
if (stack[0].indexOf('Error') === 0) { | |
stack = stack.slice(1); | |
} | |
var args = [].slice.apply(arguments).concat([stack[1].trim()]); | |
return old.apply(console, args); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Fixed this error by increasing the ram up to 768mb |
#!/usr/bin/env bash | |
function start_runserver_plus() { | |
cd /path/to/project/dir && workon myvenv && python manage.py runserver_plus 0.0.0.0:8000 --traceback -v 3 --threaded | |
} | |
function rs() { | |
# lsof -i :8000 lists processes using the 8000 port, -t option returns only the process ID | |
d_pid=`lsof -t -i :8000` | |
if [[ $d_pid ]]; then |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
# http://stackoverflow.com/a/656328/170172 | |
from django import template | |
register = template.Library() | |
@register.tag | |
def active(parser, token): | |
args = token.split_contents() |