Skip to content

Instantly share code, notes, and snippets.

View cwalther's full-sized avatar

Christian Walther cwalther

View GitHub Profile
from framebuf import FrameBuffer, MONO_HMSB, MONO_HLSB
# currently only works for monochrome (fg, bg in {-1, 0, 1})
class KeyedPalette(FrameBuffer):
def __init__(self, fg=0, bg=-1):
buf = bytearray(1)
if fg == -1:
self.key = fg = bg^1
elif bg == -1:
self.key = bg = fg^1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pew
import sys
pew.init()
def fail():
return [][0]
def main():
screen = pew.Pix()
page "KIMicro":
class pfGUITextBoxMod name "miniKITextBoxCaret_1" tag 12
pfGUIDialogMod "KIMicro"
page "KIMini":
class pfGUITextBoxMod name "miniKITextBoxCaret_0" tag 12
class pfGUIDragBarCtrl name "GUIDragBar01" tag 50
pfGUIDialogMod "KIMini"
page "KIMain":
@cwalther
cwalther / binkbegone.sh
Created December 9, 2012 18:07
CWE-ou & H-uru/Plasma History Rewrite
#!/bin/bash
if test "x$1" = x -o "x$2" = x; then
echo "Usage: $0 <original CWE-ou repo> <original H-uru/Plasma repo>"
exit 1
fi
if ! hg --version -q | grep -q "2\.[3-9]"; then
echo "Mercurial >= 2.3 is required, you have"
hg --version -q
@cwalther
cwalther / hurutooupatch.py
Created May 13, 2012 13:36
Applies some of the changes to unified diff necessary to port from H-uru/Plasma to CWE-ou
#!/usr/bin/env python
import sys
import re
import fileinput
import time
import calendar
def innerspacestotabs(m):
if m.end() % 4 == 0:
diff -r b6d0dd27bc1d Python/xKI.py
--- a/Python/xKI.py Mon Apr 09 10:27:12 2012 +0200
+++ b/Python/xKI.py Mon Apr 09 11:47:59 2012 +0200
@@ -2288,6 +2288,30 @@
sname = "Upload=%s" % (BKPlayerSelected.name)
notify.addVarNumber(sname, sendElement.getID())
notify.send()
+
+ testingnotify = ptNotify(self.key)
+ testingnotify.clearReceivers()