This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
$ = jQuery | |
queues = {} | |
running = false | |
queue = (name) -> | |
name = 'default' if name is true | |
queues[name] or= [] | |
next = (name) -> |
import java.util.ArrayList; | |
import java.util.Random; | |
import android.app.ListActivity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.ArrayAdapter; |
''' | |
Copyright (c) 2013 Zohaib Sibte Hassan | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
#!/usr/bin/env python | |
from Foundation import NSUserNotification | |
from Foundation import NSUserNotificationCenter | |
from Foundation import NSUserNotificationDefaultSoundName | |
from optparse import OptionParser | |
def main(): | |
parser = OptionParser(usage='%prog -t TITLE -m MESSAGE') |
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
# View list of connections and their states | |
netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
# List all connections and timers | |
ss -rota | less |
// | |
// Convert EventKit object to NSDictionary, for making it easy to serialize in JSON format. | |
// | |
#import "EventKit+Serializer.h" | |
@implementation EKCalendarItem (Serializer) | |
- (NSDictionary *)toDictionary | |
{ | |
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; |
// Inspired by http://bit.ly/juSAWl | |
// Augment String.prototype to allow for easier formatting. This implementation | |
// doesn't completely destroy any existing String.prototype.format functions, | |
// and will stringify objects/arrays. | |
String.prototype.format = function(i, safe, arg) { | |
function format() { | |
var str = this, len = arguments.length+1; | |
// For each {0} {1} {n...} replace with the argument in that position. If |
#!/bin/sh | |
# Nginx Cache Manager (search, remove content by URL or grep) | |
# NOTE: | |
# in my nginx config, I use: | |
# proxy_cache_key $scheme://$host$uri$is_args$args@$remote_user; | |
# ... which facilitates easier searching of cache files | |
cachefiles () { | |
find /var/lib/nginx/cache -type f $@ | |
} |