Skip to content

Instantly share code, notes, and snippets.

William Jacoby bonelifer

Block or report user

Report or block bonelifer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bonelifer
bonelifer / convert-avatars.php
Created Apr 2, 2019 — forked from tierra/convert-avatars.php
phpBB 3.1 script that fetches all remote avatars, and converts them to uploaded avatars hosted locally.
View convert-avatars.php
<?php
/**
* Converts all phpBB 3.1 remote avatars to uploaded avatars.
*
* To use this script:
*
* 1. Copy this file into the root of your phpBB installation.
* 2. Run the script from the command line: php convert-avatars.php
*
* Any avatar will be skipped if any errors come up, like these:
@bonelifer
bonelifer / reparse_bbcodes.php
Created Jun 7, 2016 — forked from 3D-I/reparse_bbcodes.php
Copied from STK for Olympus and customized to work on Ascraeus (phpBB 3.1). For me it works. Tell me if it works for you too. (Please be logged in as administrator if you call it)
View reparse_bbcodes.php
<?php
/**
*
* @package Support Toolkit - Reparse BBCode
* @version $Id$
* @copyright (c) 2009 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@bonelifer
bonelifer / rpi.py
Created May 6, 2016 — forked from HappyCodingRobot/rpi.py
Simple XBMC/Kodi controller via http POST request and JSONRPC
View rpi.py
#!/usr/bin/python
'''
Very simple XBMC/Kodi controller via http POST request and JSONRPC
(testing the principle..)
'''
import httplib
import sys, argparse
import json
PI = '192.168.162.33'
View KodiBackup.sh
### This should be run from /sdcard/Android/data/org.xbmc.kodi/files
tar cvzf /usbdisk/kodi_backup.tar.gz --exclude=.kodi/userdata/Database/Textures13.db --exclude=.kodi/userdata/Thumbnails --exclude=.kodi/temp .kodi
@bonelifer
bonelifer / 85-external-drive-rule.rules
Created May 6, 2016 — forked from eib/85-external-drive-rule.rules
How to automatically mount/unmount an external USB hard drive
View 85-external-drive-rule.rules
# File: /etc/udev/rules.d/85-external-drive-rule.rules
# Rules for auto-mounting/unmounting USB drives
ACTION=="add", ENV{ID_MODEL}=="USB_to_ATA_ATAPI_bridge", ENV{ID_VENDOR_ID}=="152d", ENV{ID_MODEL_ID}=="2338", RUN+="/usr/local/bin/automount.sh"
ACTION=="remove", ENV{ID_MODEL}=="USB_to_ATA_ATAPI_bridge", ENV{ID_VENDOR_ID}=="152d", ENV{ID_MODEL_ID}=="2338", RUN+="/usr/local/bin/unmount.sh"
# Notes:
# To detect your own drive's ID_MODEL, ID_MODEL_ID, and ID_VENDOR_ID, run "udevadm monitor --environment --udev" before plugging/unplugging the drive
# To force udev to reload these rules (without reboot), run "udevadm control --reload-rules" and "udevadm trigger"
# To change udev's logging level (written to /var/log/syslog), you can run "udevadm control --log-priority=info" (or debug), or configure it via /etc/udev/udev.conf
@bonelifer
bonelifer / backupPartition
Created Feb 19, 2016 — forked from giggio/backupPartition
Backup sd card partitions
View backupPartition
#!/bin/bash
echo deleting local files older than a week...
find /media/data/backup/* -mtime +7 -type f -delete
echo backuping up /dev/mmcblk0p1...
if [ ! -f /media/data/backup/$(date +%Y%m%d)_mmcblk0p1.img ]; then
dd if=/dev/mmcblk0p1 of=/media/data/backup/$(date +%Y%m%d)_mmcblk0p1.img
fi
echo backuping up /dev/mmcblk0p2...
@bonelifer
bonelifer / compile_ncid.sh
Created Jan 23, 2016 — forked from jriguera/compile_ncid.sh
NCID on raspberry pi (arch linux)
View compile_ncid.sh
# 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
View ubuntu-setup.sh
#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 / mysql_backup.sh
Last active Sep 14, 2015
mysql weekly Backup Script
View mysql_backup.sh
#!/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"
@bonelifer
bonelifer / update-library.py
Last active Sep 14, 2015 — forked from kevinkhill/update-library.py
Update XBMC/KODI Video Library
View update-library.py
settings = {
'hostname': '192.168.0.250',
'port': '80',
'username': 'xbmc',
'password': 'xbmc'
}
http_address = 'http://%s:%s/jsonrpc' % (settings['hostname'], settings['port'])
You can’t perform that action at this time.