Skip to content

Instantly share code, notes, and snippets.

WSGIScriptAlias / /var/www/shoal_wsgi.py
WSGIDaemonProcess shoal user=www-data group=www-data threads=10 processes=1
Alias /static /var/www/shoal-server/static/
AddType text/html .py
<Directory /var/www/shoal-server/>
Order deny,allow
Allow from all
</Directory>
@mchestr
mchestr / gist:5321808
Created April 5, 2013 19:10
squid.conf file
# WELCOME TO SQUID 2.6.STABLE21
# ----------------------------
#
# This is the default Squid configuration file. You may wish
# to look at the Squid home page (http://www.squid-cache.org/)
# for the FAQ and other documentation.
#
# The default Squid config file shows what the defaults for
# various options happen to be. If you don't need to change the
@mchestr
mchestr / gist:5358806
Created April 10, 2013 21:54
tcollector sensor instantaneous rate of bytes leaving squid.
#!/usr/bin/env python
import time
while True:
rx = open('/sys/class/net/eth0/statistics/rx_bytes')
tx = open('/sys/class/net/eth0/statistics/tx_bytes')
rx1 = int(rx.read())
tx1 = int(tx.read())
rx.close()
tx.close()
@mchestr
mchestr / aws_clean.py
Last active November 4, 2015 17:29
Clean Your AWS Regions
import argparse
import collections
import functools
import logging
import os
import re
import sys
import threading
from boto import ec2
@mchestr
mchestr / AndroidManifest.xml
Created March 21, 2018 06:19 — forked from TomTasche/AndroidManifest.xml
OAuth flow using the AccountManager on Android
<!-- ... -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- ... -->
@mchestr
mchestr / README.md
Last active June 16, 2021 09:07
Gandi DNS Updater

Gandi DNS Updater

Do you have a domain that is tied to a non-static IP, such as your home? This script when run from within your network will update your Gandi DNS to your public IP.

Setup

The following is an example of how to run this script.

@mchestr
mchestr / README.md
Last active October 13, 2024 15:24
Kubernetes on RaspberryPi ClusterHAT

Abandoned, Kubernetes, although possible to compile to run on a pi zero, was running into other issues when it came to enrolling the Zero into the cluster. Benched this to work on Docker Swarm for now which is much easier to setup.

How to get Kubernetes on a RaspberryPi ClusterHAT

This is a basic guide to getting Kubernetes running on a RaspberryPi ClusterHAT.

Hardware Used:

  • 1x RaspberryPi 3 B+
  • 4x RaspberryPi Zero
  • 1x ClusterHAT