Change directory to vitualenv:
cd /path/to/virtualenv
Download node:
wget http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
- Set prefix variable:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This example demonstrates a reverse proxy. | |
Run this example with: | |
$ python reverse-proxy.py | |
Then visit http://192.168.4.13:8000/ (or http://LISTEN_IP:LISTEN_PORT) in | |
your web browser. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SITE_ROOT = '/your/path' | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'standard': { | |
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", | |
'datefmt' : "%d/%b/%Y %H:%M:%S" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Basic statistics on a list | |
The idea of this project is to find the best width for a column in a table | |
of data. | |
''' | |
class Stats(): | |
def __init__(self, multiplier=1, percent_flag=False, tolerance=0): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/init.d/gunicorn | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import digitalocean | |
import time | |
import os | |
import sys | |
try: | |
token = os.environ["DIGO_TOKEN"] | |
except KeyError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/init.d/kippo | |
### BEGIN INIT INFO | |
# Provides: kippo | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 |
Allow incoming:
iptables -A INPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 0 -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow outgoing:
iptables -A OUTPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -m state --state ESTABLISHED,RELATED -j ACCEPT
OlderNewer