Skip to content

Instantly share code, notes, and snippets.

@sjaensch
sjaensch / mac_hotkeys.ahk
Created January 16, 2018 22:32
AutoHotkeys-Script to get Mac keyboard mappings on Windows
;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================
; significantly shortened and slightly modified version of
; https://github.com/stroebjo/autohotkey-windows-mac-keyboard/blob/master/MacKeyboard.ahk
; this file is supposed to be used together with a Windows registry change that switches LWin and LCtrl keys
; make that change with https://github.com/randyrants/sharpkeys
; --------------------------------------------------------------
@sjaensch
sjaensch / gist:a40bd729c164d5f5a7f1
Created July 6, 2014 11:21
keybase.io identity proof
### Keybase proof
I hereby claim:
* I am sjaensch on github.
* I am sj (https://keybase.io/sj) on keybase.
* I have a public key whose fingerprint is A5B7 D043 5FF6 F91E FC37 6B3A 6D15 E304 0C6A 2789
To claim this, I am signing this object:
@sjaensch
sjaensch / wraptest.py
Created May 27, 2014 10:39
xlwt row height example
#!/usr/bin/env python
import xlwt
def wraptest():
wb = xlwt.Workbook()
sty = xlwt.XFStyle()
al = xlwt.Alignment()
al.wrap = xlwt.Alignment.WRAP_AT_RIGHT
sty.alignment = al
import webapp2
from google.appengine.api import memcache
class MainHandler(webapp2.RequestHandler):
def get(self):
user_count = memcache.get('user_count')
if user_count is None:
user_count = 0
else:
self.response.write('Got user count {} from memcache.<br>'.format(user_count))