Skip to content

Instantly share code, notes, and snippets.

View bonelifer's full-sized avatar

William Jacoby bonelifer

View GitHub Profile
#!/bin/bash
echo -n "GitHub User: "
read USER
echo -n "GitHub Password: "
read -s PASS
echo ""
echo -n "GitHub Repo (e.g. foo/bar): "
USER=rentzsch
PASS=mypassword
REPO=mogenerator
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"
#!/usr/bin/perl -w
################################################################
#
# Calling this script with a parameter results in data for a
# given tv show being screen scraped from epguides.com and
# added to the episode table.
#
# Calling this script without a parameter results in the
# program table being checked for shows that need to be marked
# as already recorded so we can avoid recording episodes we
@bonelifer
bonelifer / appswitch.pl
Last active August 29, 2015 14:16 — forked from tdack/appswitch.pl
#!/usr/bin/perl -w
###############################################################################################################################
## Name: appswitch.pl
##
## Purpose: Executed by irexec this script will cycle between mythtv and kodi using a single button.
##
## (C)opyright 2008 Arksoft.
##
## Author: Arkay
##
@bonelifer
bonelifer / Home.xml
Last active September 14, 2015 13:26 — forked from palaniraja/Complete.home.xml
KODI always display IP in homescreen (confluence) - Path /Applications/Kodi.app/Contents/Resources/Kodi/addons/skin.confluence/720p/Home.xml
<control type="label">
<description>IP Address</description>
<left>200</left>
<top>5</top>
<height>49</height>
<width min="200" max="300">auto</width>
<label>IP: $INFO[Network.IPAddress]</label>
<align>left</align>
<aligny>center</aligny>
<font>font12</font>
@bonelifer
bonelifer / update-library.py
Last active September 14, 2015 13:29
Update XBMC/KODI Video Library
settings = {
'hostname': '192.168.0.250',
'port': '80',
'username': 'xbmc',
'password': 'xbmc'
}
http_address = 'http://%s:%s/jsonrpc' % (settings['hostname'], settings['port'])
@bonelifer
bonelifer / mysql_backup.sh
Last active September 14, 2015 13:48
mysql weekly Backup Script
#!/bin/sh
now="$(date +'%d_%m_%Y_%H_%M_%S')"
filename="mysql-kodi_backup_$now".gz
backupfolder="/media/5a24e136-09b9-48e1-95db-b44d5db3e28a/Backup/mysql"
fullpathbackupfile="$backupfolder/$filename"
logfile="$backupfolder/"backup_log_"$(date +'%Y_%m')".txt
echo "mysqldump started at $(date +'%d-%m-%Y %H:%M:%S')" >> "$logfile"
mysqldump --user=xbmc --password=xbmc --default-character-set=utf8 --single-transaction --all-databases | gzip > "$fullpathbackupfile"
echo "mysqldump finished at $(date +'%d-%m-%Y %H:%M:%S')" >> "$logfile"
#update
apt-get update
# synapse app launcher
add-apt-repository ppa:synapse-core/ppa
apt-get update
apt-get install synapse
# gnome classic
apt-get install gnome-session-fallback
@bonelifer
bonelifer / compile_ncid.sh
Created January 23, 2016 20:56 — forked from jriguera/compile_ncid.sh
NCID on raspberry pi (arch linux)
# Install compile requirements
pacman -S gcc make
# Install lib requirements for ncid
pacman -S libpcap
# Download
curl http://heanet.dl.sourceforge.net/project/ncid/ncid/1.2/ncid-1.2-src.tar.gz -o ncid-1.2-src.tar.gz
# Compile
@bonelifer
bonelifer / pandora_tls.sh
Last active November 8, 2018 01:55
Replace Pandora's old tls fingerprint with new one in pianobar config
#!/bin/bash
##
## A simple little shell script that will return the current
## fingerprint on the SSL certificate and replace it in
## pianobar's config file automatically
##
## Author: William Jacoby (bonelifer) <>
##
## Base on the Github Gist by Bob Saska at: https://gist.github.com/r35krag0th/4173333
##