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
Acquire::http::proxy "http://apt-cacher.lan:3142/"; | |
Acquire::https::proxy "http://apt-cacher.lan:3142/"; |
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
import serial | |
import sys | |
import datetime | |
port = sys.argv[1] | |
try: | |
ser = serial.Serial(port=port, baudrate=115200, timeout=5) | |
while 1: | |
data = "{},{},{}".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), | |
port, |
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
pkg info | cut -f1 -d" " | xargs pkg remove -y; pkg update -f; pkg upgrade -y |
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 | |
## Config | |
ETHERPAD_VER=1.6.0 | |
# Github URL to | |
URL=https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VER}.tar.gz | |
TMP_FILE=/tmp/etherpad.tar.gz | |
# Root directory for etherpad. | |
ETHER_ROOT=/srv/etherpad |
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 python2 | |
from __future__ import print_function | |
import re | |
import subprocess | |
import libzfs | |
def get_disk_info(dev): | |
result = subprocess.check_output(["camcontrol", "identify", dev]) | |
serial = re.compile("serial number[ ]+ ([^\n]+)").findall(result)[0] | |
model = re.compile("device model[ ]+ ([^\n]+)").findall(result)[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 | |
showmount -e ${1} | cut -f1 -d" " | tail -n +2 | xargs -n1 -I{} mkdir -p {} | |
showmount -e ${1} | cut -f1 -d" " | tail -n +2 | xargs -n1 -I{} mount ${1}:{} {} |
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 | |
cpufreq-set --cpu 0,1,2,3,4,5,6,7 --min 2.5GHz --max 4.0GHz --governor performance |
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
import serial | |
import sys | |
import datetime | |
port = sys.argv[1] | |
ser = serial.Serial(port=port, baudrate=115200, timeout=5) | |
try: | |
while 1: | |
data = "{},{},{}".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), | |
port, |
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 bash | |
# Root for debootstrap | |
ROOT=$1 | |
# apt-cacher-ng location | |
PROXY=http://127.0.0.1:3142 | |
# Unmount and drop the bootstrap location. | |
umount ${ROOT}/* | |
rm -rf ${ROOT} |