Skip to content

Instantly share code, notes, and snippets.

@Thermionix
Thermionix / grub.cfg
Last active June 7, 2021 17:47
grub2 loopback multiboot flash drive
moved to https://github.com/Thermionix/multipass-usb
@Thermionix
Thermionix / local.rules
Created May 17, 2012 01:58
usb hdd sync via udev & rsync
# /etc/udev/rules.d/local.rules
# ADD rule: if we have a valid ID_FS_LABEL_ENC, and it's USB, mkdir and mount
ENV{ID_FS_LABEL_ENC}=="?*", ACTION=="add", SUBSYSTEMS=="usb", \
RUN+="/usr/local/sbin/udev-automounter.sh %k"
@Thermionix
Thermionix / gist:2715702
Created May 17, 2012 02:14
Virtualhost for Couchpotato, Sickbeard, Headphones, Deluge and SABnzbd
<ifmodule mod_ssl.c>
<virtualhost *:443>
DocumentRoot /var/www
<directory " var www>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
@Thermionix
Thermionix / gist:2715786
Created May 17, 2012 02:35
APC SC1000 UPS apcupsd usb serial adapter configuration
# use lsusb to find the details of the serial adapter to create a udev rule
~$ lsusb | grep Serial
Bus 003 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
# based on the output from lsusb add a rule to /etc/udev/rules.d/local.rules
~$ cat /etc/udev/rules.d/local.rules
#Bus 004 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port"
@Thermionix
Thermionix / gen_md5.sh
Created May 30, 2012 06:52
recursively check or generate md5 checksums for a folder
#!/bin/bash
cd ../iso/
for f in `find . -type f -not -name "*.md5" -printf "%f\n"`
do
if [ -f ${f}.md5 ]
then
md5sum -c $f.md5
#| grep FAILED$ > failed_hashes
@Thermionix
Thermionix / auth-basic.conf
Last active November 4, 2021 00:56
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@Thermionix
Thermionix / newznabd.sh
Last active September 3, 2016 23:06
start-stop-daemon version of the newznab update script
#!/bin/sh
#
# Ian - 16/11/2011
# /etc/init.d/newznab: start and stop the newznab update script
#
# run update-rc.d newznab_ubuntu.sh defaults
### BEGIN INIT INFO
# Provides: Newznab
#!/bin/bash
echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install dkms
sudo apt-get install virtualbox-4.2 --no-install-recommends
vbox_version=`wget -q -O - http://download.virtualbox.org/virtualbox/LATEST.TXT`
wget http://download.virtualbox.org/virtualbox/$vbox_version/Oracle_VM_VirtualBox_Extension_Pack-$vbox_version.vbox-extpack
@Thermionix
Thermionix / owncloud.conf
Created August 2, 2013 03:15
nginx conf for owncloud 5.0 in subdir
location /owncloud {
client_max_body_size 1024M;
location ~ ^/owncloud/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
rewrite ^/owncloud/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/owncloud/.well-known/host-meta.json /public.php?service=host-meta-json last;
rewrite ^/owncloud/.well-known/carddav /remote.php/carddav/ redirect;
@Thermionix
Thermionix / stream.jblive.sh
Created August 26, 2013 00:31
jblive stream rtsp audio only
#!/bin/bash
ffplay -vn -rtsp_transport tcp -allowed_media_types audio -nodisp rtsp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream