Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import subprocess
import os
import signal
import contextlib
import json
import argparse
import time
import struct
@lahwran
lahwran / aprilfools.py
Created April 4, 2013 23:55
a bunch of varyingly rushed hacks I've written over the past couple of years
# put on permanent pythonpath, add "import aprilfools" to sitecustomize.py
import datetime
d = datetime.date.today()
if d.month==4 and d.day==1 or __name__ == "__main__":
from itertools import cycle as J
from itertools import izip as K
import sys
class L(object):
def __init__(C,B):
@canton7
canton7 / 0main.md
Created September 17, 2012 12:57
Git Bisect and Feature Branches

Git Bisect and Feature Branches

There are people out there who claim that merge-based workflows (that is, workflows which contain non-fast-forward merges) are bad. They claim that git bisect gets confused by merge-based workflows, and instead advocate rebase-based workflows without explicit feature branches.

They're wrong.

Furthermore, the "advantages" of their workflows are in fact disadvantages. Let me show you.

anonymous
anonymous / NPCC2_ Deckmaster
Created January 7, 2012 20:25
Deckmaster's code for NPCC 2
Deckmaster's solutions for the second NPCC. Labeled by number
Problem 1:
def match_all(s):
count = 0
for lett in s:
if "(" == lett:
count += 1
if ")" == lett:
count -= 1
@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
@nijikokun
nijikokun / css-notes.css
Created July 23, 2011 02:30
CSS & CSS3 Notes, Constantly Used, Very helpful.
/*
* CSS & CSS3 Notepad
*
* These were made for my personal usage, as I constantly use them.
* I have decided to open-source the file.
*
* Some is very useful, other things may be re-dundant.
*
* Once again, these are simply my css notes.
*
// Example ModLoader Mod by BlockAfterBlock (for #mcp-modding irc)
// Shows adding a block, an item, custom textures, adding a recipe,
// adding a smelting recipe, AND ADDING AN ENTITY.
package net.minecraft.src;
public class mod_ExampleMod extends BaseMod
{
//This can be almost anything to my knowledge. I just put version of Minecraft.
public String Version()
@endolith
endolith / Has weird right-to-left characters.txt
Last active May 18, 2024 22:32
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶