A list of amazing resources related to Distributed Systems.
Some noteworthy projects.
" WSGI, syntax highlight as python | |
au BufNewFile,BufRead *wsgi set filetype=python |
" Git Syntax Highlighting | |
hi gitcommitSummary guifg=#8ac6f2 gui=none | |
hi gitcommitOnBranch guifg=#99968b gui=italic | |
hi gitcommitBranch guifg=#FFCC66 gui=none | |
hi gitcommitHeader guifg=#C4C4C4 gui=none | |
hi gitcommitDiscardedType guifg=#99968b gui=none | |
hi gitcommitSelectedType guifg=#99968b gui=none | |
hi gitcommitUnmergedType guifg=#99968b gui=none |
svn st --ignore-externals | grep ^? | sed 's/\?/svn add/' | sh |
sudo rm /var/lib/mongodb/mongod.lock | |
sudo -u mongodb mongod -f /etc/mongodb.conf --repair | |
sudo start mongodb | |
sudo status mongodb |
var image = $(document.createElement("img")) | |
.height("100px") | |
.width("100px") | |
.hide() | |
.load(function () { // show image only if it is loaded ok | |
$(this).show(); | |
}); | |
// box is some div having background image (which serves as default if image above is not loaded) | |
box.append(image); |
# pagination.py | |
class Paginator(object): | |
def __init__(self, query, per_page): | |
"""Initialize a paginator. | |
Arguments: | |
- query -- queryset from pymongo or mongoengine | |
- per_page -- number of items per page |
import json | |
from functools import wraps | |
from flask import redirect, request, current_app | |
def support_jsonp(f): | |
"""Wraps JSONified output for JSONP""" | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
callback = request.args.get('callback', False) | |
if callback: |
#!/bin/bash | |
# see http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users/137173#137173 | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") |
A list of amazing resources related to Distributed Systems.
Some noteworthy projects.
### Keybase proof | |
I hereby claim: | |
* I am farazdagi on github. | |
* I am farazdagi (https://keybase.io/farazdagi) on keybase. | |
* I have a public key whose fingerprint is 0F9C BFAE 03CD 209B 51E7 D19F BA58 0291 4C6B 4732 | |
To claim this, I am signing this object: |