I hereby claim:
- I am rockymeza on github.
- I am rockymeza (https://keybase.io/rockymeza) on keybase.
- I have a public key whose fingerprint is 88B0 84DA 0420 C198 E6AA C889 37C5 522F 1DED 379A
To claim this, I am signing this object:
# /etc/nginx/uwsgi_params | |
uwsgi_param QUERY_STRING $query_string; | |
uwsgi_param REQUEST_METHOD $request_method; | |
uwsgi_param CONTENT_TYPE $content_type; | |
uwsgi_param CONTENT_LENGTH $content_length; | |
uwsgi_param REQUEST_URI $request_uri; | |
uwsgi_param PATH_INFO $document_uri; | |
uwsgi_param DOCUMENT_ROOT $document_root; |
I hereby claim:
To claim this, I am signing this object:
// Based on idea from @nolsto | |
function makeDecorator(decorator) { | |
return function(target, key, descriptor) { | |
if (typeof descriptor !== 'undefined') { | |
descriptor.value = decorator(descriptor.value); | |
return descriptor | |
} else { | |
return decorator(target); | |
} |
function Relation(schema, data) | |
{ | |
this.schema = schema; | |
this.data = data; | |
// only supports equals for now | |
this.s = function(attribute, value) { | |
var index = this.schema.indexOf(attribute); | |
var new_data = this.data.filter(function(datum) { | |
return datum[index] == value; |
#include <stdio.h> | |
#include <limits.h> | |
#define CHAR_MIN_OFFSET CHAR_MIN - CHAR_MIN | |
#define CHAR_MAX_OFFSET UCHAR_MAX - CHAR_MIN | |
main() | |
{ | |
int i, count[CHAR_MAX_OFFSET]; | |
char c; |
\usepackage{xspace} | |
\newcommand\bs{{\textbackslash}\xspace} | |
%% in content later on | |
``Look at her, a prisoner of the gutter \bs condemned by every syllable she utters'' |
>>> from django.template import Template, Context | |
>>> Template('{{ foo|default:bar|default:"test" }}').render(Context({'bar': 1})) | |
u'1' | |
>>> Template('{{ foo|default:bar.baz|default:"test" }}').render(Context({'bar': 1})) | |
Traceback (most recent call last): | |
File "<input>", line 1, in <module> | |
File "/XXX/site-packages/django/template/base.py", line 140, in render | |
return self._render(context) | |
File "/XXX/site-packages/django/template/base.py", line 134, in _render | |
return self.nodelist.render(context) |
from django.conf import settings | |
from django.core.serializers import serialize | |
def backupmodel(model_class): | |
""" | |
Takes a model class and backs up all of the rows in a JSON file. | |
""" | |
log.info("Backing up %s", model_class) |
#!/usr/bin/env python | |
""" | |
A command to check redirects. | |
Expects stdin in to look like this: | |
http://example.com/old-url,http://example.com/new-url | |
Outputs to stderr: |
2013-08-07 08:36 enabled | |
2013-08-07 08:36 12,992 | |
2013-08-07 08:36 16,836 | |
2013-08-07 08:37 19,888 | |
2013-08-07 08:37 22,680 | |
2013-08-07 08:39 24,556 | |
2013-08-07 10:07 188,036 | |
2013-08-07 10:12 195,804 | |
2013-08-07 10:34 225,264 | |
2013-08-07 11:18 297,664 |