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
# %(mysite)s - run %(mysite)s instances (default is the main production instance) | |
# | |
# This runs gunicorn-django for %(mysite)s; to install: | |
# * sudo ln -s <this file> /etc/init/%(mysite)s | |
# * sudo initctl reload-configuration | |
# | |
# it expects the following directory layout: | |
# | |
# /home/%(mysite)s/public_html | |
# \-env -> virtualenv |
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
# upstart job for supervisord | |
description "supervisord process supervisor" | |
author "Sabin Iacob <[email protected]>" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
respawn | |
respawn limit 10 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 sys | |
from random import random | |
from time import sleep | |
from threading import Thread, active_count | |
execfile('gunicorn.conf.py') |
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/sh | |
export PATH=/bin:/sbin:/usr/bin:/usr/sbin | |
radvdump | awk '/Router Advertisement/{router=$NF}; /interface eth0\.2/{good_if=1}; /interface br-lan/{good_if=0}; /prefix/{if(good_if && $1 == "prefix"){print router" "$2}}' | while read router prefix; do | |
old_prefix=$(uci -q get "radvd.@prefix[0].prefix") | |
new_prefix=$(echo $prefix | sed -e 's@1::1\?/64$@2::/64@g') | |
lan_addr=$(echo $prefix | sed -e 's@1::1/64$@2::1/64@g') | |
new_addr=$(echo $prefix | sed -e 's@1::1/64$@1::2/64@g') | |
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
set $ssl off; | |
if ($scheme = https) { | |
set $ssl on; | |
} | |
proxy_set_header X-Forwarded-Ssl $ssl; |
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 | |
# | |
# Copyright 2013 Sabin Iacob <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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/sh -e | |
if [ -z "$1" ]; then | |
echo "$0: called with no interface" 1>&2 | |
exit 1; | |
fi | |
if [ "$2" != "up" ]; then | |
exit 0 | |
fi |
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
feeds: | |
raspi: | |
interval: 24 hours | |
html: | |
url: http://www.raspberrypi.org/downloads | |
links_re: | |
- http://downloads\.raspberrypi\.org/images/.+\.torrent | |
regexp: | |
accept: |
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 | |
# Copyright (c) Sabin Iacob <[email protected]>. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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
echo "dataflow_batch_export | |
dataflow_batch_import | |
log_customer | |
log_quote | |
log_summary | |
log_summary_type | |
log_url | |
log_url_info | |
log_visitor | |
log_visitor_info |
OlderNewer