Skip to content

Instantly share code, notes, and snippets.

View kennydude's full-sized avatar

Joe Simpson kennydude

View GitHub Profile

This Gist Fixes Oggs

What we do is check using "ogginfo" which you need installed to your system and if that tells us your ogg file is dodgy it'll fix it.

It works for Vorbis files as Banshee had trouble playing some badly encoded ones. It seems to retain all tags too!

You may need to modify the location of the music for it to work depending on your setup!

'''
FailProxy
created by @kennydude
You need a failproxy.txt in the same directory as this script.
Then launch, configure your browser to connect here.
Now put something in failproxy.txt, save and reload.
Whoops! You just cut off access, remove contents of that file to restore access
@kennydude
kennydude / udp-messaging.py
Created April 8, 2011 10:11
Simple UDP messaging tool in python to send cross-network messages to all other users. (Useful for people in multiple rooms at home!)
#!/usr/bin/python
# UDP messaging
try:
import tkMessageBox
def displayMessage(message):
tkMessageBox.showinfo("Message", message)
except ImportError:
pass
def geti(array, item):
@kennydude
kennydude / Response Hanlder.java
Created April 4, 2011 18:53
Response Handler
if(response.getStatusLine().getStatusCode() == 200){
}
@kennydude
kennydude / SimpleDjangoTags.py
Created May 23, 2010 18:04
Extremely Simple Django Template Tags
'''
Extremely Simple Django Template Tags!
'''
from django.template import Library, Node, TemplateSyntaxError, resolve_variable
from django.utils.translation import ugettext as _
register = Library()
class GenericTNode(Node):
def __init__(self, parts):
@kennydude
kennydude / fugue-generate-html.py
Created May 11, 2010 18:26
Generates a html file with all the fugue shadowless icons in it!
#!/usr/bin/python
'''
Tools for generating html for fugue icons
THEY MUST BE IN DIR fugue-icons FROM THIS SCRIPT!
Make sure you can write to icons.html
Your web browser may crash while first rendering
'''
print "Generating html..."
import os
@kennydude
kennydude / loves.py
Created March 7, 2010 15:21
It's that love game that loads of girls love to do. I recreated how it did that completly in Python!
import time
print "LOVE"
print "begin typing:"
_lover = raw_input()
lover = _lover.upper()
print "loves"
_loved = raw_input()
loved = _loved.upper()
print "Contacting cupids... please hold..."