Skip to content

Instantly share code, notes, and snippets.

View andrecarini's full-sized avatar

André Carini andrecarini

View GitHub Profile
@lukegb
lukegb / vvvvvv_music_unpacker.py
Created August 24, 2011 21:15
Unpack music from VVVVVV's music file!
f = open("vvvvvvmusic.vvv", 'rb')
q = f.read()
FILE_NAMES = ['0levelcomplete.ogg','1pushingonwards.ogg','2positiveforce.ogg','3potentialforanything.ogg','4passionforexploring.ogg','5intermission.ogg','6presentingvvvvvv.ogg','7gamecomplete.ogg','8predestinedfate.ogg','9positiveforcereversed.ogg','10popularpotpourri.ogg','11pipedream.ogg','12pressurecooker.ogg','13pacedenergy.ogg','14piercingthesky.ogg']
startAt = endAt = -1
musStartAt = musEndAt = -1
currentMus = 0
while True:
oldStartAt = startAt
@m4rc1e
m4rc1e / django-anonymous-required.py
Created June 27, 2016 08:56
Django decorator for views that allow only unauthenticated users to access view.
from django.shortcuts import redirect
def anonymous_required(redirect_url):
"""
Decorator for views that allow only unauthenticated users to access view.
Usage:
@anonymous_required(redirect_url='company_info')