Skip to content

Instantly share code, notes, and snippets.

View mathieulongtin's full-sized avatar

mathieulongtin

View GitHub Profile
@mathieulongtin
mathieulongtin / capslock-as-fn.ahk
Last active October 20, 2020 18:05
Use caps lock instead of fn for home/end/pgup/pgdn - Auto Hot Key
; For those laptop that don't have home/end/pgup/pgdn,
; you can now use caps lock + left/right/up/down, respectively.
#SingleInstance force
SetWorkingDir %A_ScriptDir%
CapsLock & Left::Send {Blind}{Home}
CapsLock & Right::Send {Blind}{End}
CapsLock & Up::Send {Blind}{PgUp}
CapsLock & Down::Send {Blind}{PgDn}
@mathieulongtin
mathieulongtin / redis-db-mem.py
Created October 12, 2016 20:00
Prints the number of bytes per db in Redis
import sys
import redis
if len(sys.argv) == 0:
print "Usage: redis-db-mem.py HOST [PORT]"
sys.exit(2)
host = sys.argv[1]
if len(sys.argv) > 2:
port = int(sys.argv[2])