Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Marc Hörsken mback2k

I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mback2k on github.
  • I am mback2k ( on keybase.
  • I have a public key ASAo5x9qPUp7vKH67yo54IK8gQGgZd7euqgybo6bbzBnbAo

To claim this, I am signing this object:

mback2k /
Created Nov 19, 2013
Convert hg commit hashes to git tags after using hg-git
import sys, os, os.path
def main(args):
if len(args) == 2:
return tags(os.path.abspath(args[1]))
print 'Usage: <hg-repository-path>'
def tags(repo):
if not os.path.exists(repo):
mback2k / select_ws.bat
Last active Jul 31, 2017
select_ws example program
View select_ws.bat
mingw32-gcc select_ws.c -Wl,-lws2_32 -g -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wundef -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -Wno-pedantic-ms-format -Wno-system-headers -o select_ws.exe
mback2k /
Created Dec 23, 2012
Transform case using RegExp
import unittest
import re
class RegexTransformCase(unittest.TestCase):
def setUp(self):
self.pattern = r'(?<!\\)\\(U|L)(.*?)(?<!\\)\\[ELU]'
self.upper_strings = [
(r'\Uhello\E', r'HELLO'),
(r'\\Uhello\E', r'\\Uhello\E'),
mback2k /
Last active Oct 5, 2015
Compile debug release of PureBasic project
from xml.etree import ElementTree
import sys, subprocess
NAMESPACE = r'{' + r'' + r'}' + r'%s'
'x64': r'C:\Program Files\PureBasic\Compilers\pbcompiler.exe',
'x86': r'C:\Program Files (x86)\PureBasic\Compilers\pbcompiler.exe',
You can’t perform that action at this time.