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
View keybase.md

Keybase proof

I hereby claim:

  • I am mback2k on github.
  • I am mback2k (https://keybase.io/mback2k) on keybase.
  • I have a public key ASAo5x9qPUp7vKH67yo54IK8gQGgZd7euqgybo6bbzBnbAo

To claim this, I am signing this object:

@mback2k
mback2k / git-mapfile-tags.py
Created Nov 19, 2013
Convert hg commit hashes to git tags after using hg-git
View git-mapfile-tags.py
import sys, os, os.path
def main(args):
if len(args) == 2:
return tags(os.path.abspath(args[1]))
else:
print 'Usage: <hg-repository-path>'
def tags(repo):
if not os.path.exists(repo):
@mback2k
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
mback2k / regex_transform_case.py
Created Dec 23, 2012
Transform case using RegExp
View regex_transform_case.py
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
mback2k / pbcompile.py
Last active Oct 5, 2015
Compile debug release of PureBasic project
View pbcompile.py
#!/usr/bin/python
from xml.etree import ElementTree
import sys, subprocess
NAMESPACE = r'{' + r'http://www.purebasic.com/namespace' + r'}' + r'%s'
COMPILER = {
'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.