Skip to content

Instantly share code, notes, and snippets.

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@cbfl
cbfl / MyVideoNav.xml
Last active August 29, 2015 14:00
Moded Confluence XBMC Skin - /usr/share/xbmc/addons/skin.confluence/720p/MyVideoNav.xml
<window>
<defaultcontrol always="true">50</defaultcontrol>
<allowoverlay>no</allowoverlay>
<views>504,50,51,500,550,551,560,501,508,503,515,505,511</views>
<onload condition="!Skin.HasSetting(FirstTimeRun)">ActivateWindow(1112)</onload>
<onload condition="Skin.HasSetting(ActivateTvTunes) + System.HasAddon(script.tvtunes)">XBMC.RunScript(script.tvtunes,backend=True&amp;loop=False)</onload>
<controls>
<include>CommonBackground</include>
<include>ContentPanelBackgrounds</include>
<control type="group">
@cbfl
cbfl / service.py
Last active August 29, 2015 14:00
.xbmc/addons/script.xbmc.subtitles/resources/lib/services/Addic7ed
# -*- coding: utf-8 -*-
import os, sys, re, xbmc, xbmcgui, string, urllib, urllib2, socket
from utilities import log, languageTranslate
from BeautifulSoup import BeautifulSoup
_ = sys.modules[ "__main__" ].__language__
self_host = "http://www.addic7ed.com"
@cbfl
cbfl / keyboard.xml
Last active August 29, 2015 14:00
XBMC - Apple remote - up/down volume control - ~/.xbmc/userdata/keymaps/
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<FullscreenVideo>
<keyboard>
<up>VolumeUp</up>
<down>VolumeDown</down>
</keyboard>
</FullscreenVideo>
# /etc/rc_keymaps/apple_remote
# Apple Remote
0x77e15032 KEY_UP
0x77e13032 KEY_DOWN
0x77e19032 KEY_LEFT
0x77e16032 KEY_RIGHT
0x77e1a032 KEY_ENTER
0x77e1c032 KEY_ESC
rm ~/Library/Caches/Java/deployment.properties
sudo rm -rf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
sudo rm -f /System/Library/Frameworks/JavaVM.framework/Versions/1.6
sudo rm -rf /System/Library/Java/JavaVirtualMachines/*
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -f /private/var/db/receipts/com.apple.pkg.JavaForMacOSX107.bom
sudo rm -f /private/var/db/receipts/com.apple.pkg.JavaForMacOSX107.plist
@cbfl
cbfl / gist:2725101
Last active October 5, 2015 00:38
hosts - NoAds
127.0.0.1 ad.dc2.adtech.de
127.0.0.1 adocean.pl
127.0.0.1 ads.btv.bg
127.0.0.1 ads.zamunda.net
127.0.0.1 ads1.msn.com
127.0.0.1 ads2.zamunda.net
127.0.0.1 adserver.xs-software.com
127.0.0.1 adservices.google.com
127.0.0.1 adwise.bg
127.0.0.1 as.adwise.bg
@cbfl
cbfl / hack.sh
Created April 6, 2012 05:53 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@cbfl
cbfl / remove_all_gems.sh
Created September 19, 2011 14:59
remove all gems sh
gem list | while read fn;do gem uninstall -a `echo $fn | cut -d' ' -f1`;done