Skip to content

Instantly share code, notes, and snippets.

View Apocrathia's full-sized avatar
👾

Ian Apocrathia

👾
View GitHub Profile
@Apocrathia
Apocrathia / makehab.sh
Last active March 23, 2016 21:29
Quick script to get openHAB installed on your Debian (Jessie) based system.
#!/bin/bash
echo "This script will install and start openHAB on your system"
echo "Grabbing the openHAB Repository Key"
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list
curl 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
@Apocrathia
Apocrathia / dbup.sh
Created July 21, 2014 15:32
MySQL Database Backup Script
#!/bin/bash
DBHOST=localhost
DBUSER=backup
DBPASS=*********
[email protected]
MES=/tmp/myback.txt
# format is YYYYMMDD
DATE=`date +%Y%m%d`
@Apocrathia
Apocrathia / iptables.sh
Created July 21, 2014 15:30
iptables Pre-Flight Script.
#!/bin/bash
# iptables preflight configuration
#Setting up some Variables #####################################################
EXTIP=`ifconfig | grep -b1 "eth0" | grep -i inet | cut -d":" -f2 | cut -d" " -f1` # Example 1.2.3.4
INTNET=10.0.1.1/24 # Example 192.168.1.0/24
EXTIF=eth0 # Example eth0
INTIF=eth1 # Example eth1
#Disabling ipforwarding aka routing ############################################
@Apocrathia
Apocrathia / volumefade.applescript
Created July 21, 2014 15:29
Volume Fade AppleScript
set desiredVolume to 25 -- set to regular listening level
set interval to 15 -- start to finish time
set waitTime to 60 -- 1 minute wait time
repeat with X from 1 to desiredVolume
set volume output volume X
delay waitTime
end repeat
@Apocrathia
Apocrathia / com.apocrathia.sickrage.plist
Last active October 14, 2018 16:54
SickRage Update
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apocrathia.sickrage</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Users/ianyoung/Sites/Sickrage/SickBeard.py</string>