Skip to content

Instantly share code, notes, and snippets.

View lad1337's full-sized avatar
🤔
💡

Dennis Lutter lad1337

🤔
💡
View GitHub Profile
@lad1337
lad1337 / growlSocketServer.js
Created September 15, 2011 11:18
a websocket server for NodeJS that creates growl notifications with the help of growlnotify
var port = 8000;
var WebSocketServer = require('websocket').server;
var http = require('http');
var exec = require('child_process').exec
var child;
function createGrowlNotification(cmd){
child = exec('growlnotify -m "'+cmd.body+'" -t "'+cmd.title+'" --image "'+cmd.icon+'"',
@lad1337
lad1337 / keyboard.audio.sub.xml
Created September 17, 2011 14:12
xbmc keymap that maps up to cycle through audio languages and down to toggle subtitels
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<keymap>
<FullscreenVideo>
<keyboard>
<up>AudioNextLanguage</up>
<down>ShowSubtitles</down>
</keyboard>
</FullscreenVideo>
</keymap>
@lad1337
lad1337 / buildPackage.py
Created September 19, 2011 15:13
mac build script for sickbeard
"""
Usage:
python buildPackage.py
"""
from distutils.core import setup
import sys
import os
import re
@lad1337
lad1337 / SickbeardConnect.user.js
Created December 8, 2011 21:17
SickBeard user script
// ==UserScript==
// @name SickBeard UserScript
// @description Add movies to your CouchPotato via external sites like IMDB
// @include http*://*.imdb.com/title/tt*
// @include http*://imdb.com/title/tt*
// @include http://lad1337.ath.cx:8083/*
// @include http://*.sharethe.tv/movies/*
// @include http://sharethe.tv/movies/*
// @include http://*.moviemeter.nl/film/*
// @include http://moviemeter.nl/film/*
@lad1337
lad1337 / transcode10to8.sh
Created April 1, 2012 18:30
reencode 10-bit anime mkvs into 10-bit versions using HandBrakeCli and this only when needed
#!/bin/bash
# ----------
# This script uses HandBrakeCLI to convert any mkv x264 video to 8-bit (high @ 4.1 Profile)
# and this only when needed!!
#-----------
# based on the script by enolive located here http://pastebin.com/2rCh13Pk
# ----------
# Needed tools:
# HandBrakeCLI get it here http://handbrake.fr/downloads2.php
# ----------
@lad1337
lad1337 / userstylesheet.css
Created April 4, 2012 11:26
xbmc default webserver (second) fullscreen mod
body{
background: #000;
}
#header{
display: none;
}
#footerPopover{
height: 100%;
@lad1337
lad1337 / add_mp3s_to_itunes.scpt
Created May 26, 2012 00:14
applescript that will add mp3s to itunes with some extras
# this script will go thru all sub folders (recursively) and look for mp3s it will add these mp3s to iTunes
# after all mp3s where added iTunes "Match" will be updated (optional)
# all mps3 will be deleted (optional)
# for every added files a growl message is send (optional)
# please see propertys bellow for settings. 0 = Off / No. 1 = ON / Yes
# USAGE: set this script as a folder action for a folder you want to watch or use it from the command line with: osascript add_mp3s_to_itunes.scpt <folder_to_process>
# for use with sabnzbd create a "sabToitunes.py" python script and place it next to this file. the contense is as follows (without the leading "(*" and trailing "*)"):
(*
#!/usr/bin/python
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
// how many buttons?
if (request.method == "getStatus"){
if(localStorage["xbmc_count"])
sendResponse({status: localStorage["xbmc_count"]});
else
sendResponse({status: 0});
}
if (request.method == "getImage")
sendResponse({image: localStorage["imageNo"]});
@lad1337
lad1337 / coldroms
Last active January 1, 2016 06:49
hacky easy rom loader
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
import requests, clint, easydict
except ImportError:
import pip
pip.main(["install", "requests", "clint", "easydict"])
import requests, clint, easydict
import tempfile, re, sys, os, zipfile
from Crypto.Cipher import AES
import base64
import re
from codecs import open
PADDING = '{'
BLOCK_SIZE = 32
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * PADDING