Skip to content

Instantly share code, notes, and snippets.

# /opt/nginx/sbin/uwsgi --ini /etc/uwsgi/mailman.ini
[uwsgi]
master = True
touch-reload = %p
daemonize = /var/log/uwsgi-mailman.log
pidfile = /var/run/uwsgi-mailman.pid
log-maxsize = 20971520
socket = 127.0.0.1:4010
#!/bin/sh
# You can optionally connect to the VM with
# virt-viewer -c qemu:///system Debian7
export OS=Debian7
virt-install \
--connect qemu:///system \
--name ${OS} \
--ram 512 \
--vcpus 1 \
@drucko
drucko / kvm-autoinstall
Created April 25, 2014 10:25
Massautoinstall KVM Guests with LVM
#!/bin/bash
set -x
function createVolume {
lvmname=$1
echo "creating LVM $lvmname"
lvcreate -n $lvmname -L20G vg0
from fabric.api import *
env.hosts = ['host.name.com']
env.user = 'user'
env.key_filename = '/path/to/keyfile.pem'
def local_uname():
local('uname -a')
def remote_uname():
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),

TheForeman + Libvirt notes

Foreman+KVM on the same physical host

Set up a bridge

  • virsh iface-bridge eth0 br0
  • If you had NM_CONTROLLED=no in there, re-add it to both ifcfg files because virsh probably just removed it for you.
#!/bin/sh
# You can optionally connect to the VM with
# virt-viewer -c qemu:///system Debian7
export OS=Debian7
virt-install \
--connect qemu:///system \
--name ${OS} \
--ram 512 \
--vcpus 1 \

1. Install dependencies

apt-get install automake avahi-daemon build-essential checkinstall db5.1-util db-util git-core libacl1-dev libavahi-client-dev libdb5.1-dev libgcrypt11 libgcrypt11-dev libpam0g-dev libtool pkg-config

2. Download and unpack source

cd /usr/src/
wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.6.tar.gz
tar -xvzf netatalk-3.1.6.tar.gz
@drucko
drucko / DownloadStationAPI.py
Created November 25, 2015 17:18 — forked from harperreed/DownloadStationAPI.py
example script to sync/download/etc put.io downloads to your synology download station
import time
import requests
import json
class DownloadStationAPI():
def __init__(self, host=None, username=None, password=None):
self.name = 'DownloadStation'
@drucko
drucko / fdisk.in
Created December 30, 2015 11:33 — forked from icopitg-fh/fdisk.in
Buildroot image install script. We use syslinux to boot the system. fdisk.in file is a necessary include that automates the creation of our partitions.
d
1
d
2
d
3
d
4
n
p