Skip to content

Instantly share code, notes, and snippets.

upstream backend {
server 127.0.0.1:9000;
}
server {
listen 80;
server_name dev.screenpop.co.uk www.dev.screenpop.co.uk;
access_log /var/log/nginx/dev.screenpop.co.uk.access.log;
error_log /var/log/nginx/dev.screenpop.co.uk.error.log;
rewrite_log on;
root /var/www/html/app/webroot;
#!/bin/bash
cd /var/www/dev/fb-tab
git pull origin master
cd ~
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option switchrate=10hz
inline int af_inet = 2; /* AF_INET defined in bsd/sys/socket.h */
inline int af_inet6 = 30; /* AF_INET6 defined in bsd/sys/socket.h */
dtrace:::BEGIN
{
def my_func():
return "embedding?"

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.

README is empty

@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:33
1000 lines

README is empty

@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:57
1000 lines

README is empty

@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:57
1000 lines

README is empty