This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import resource | |
| from functools import wraps | |
| def mem_it(func): | |
| @wraps(func) | |
| def wrapper(*args, **kwargs): | |
| print( | |
| 'Pre-memory usage: {} (mb)'.format( | |
| resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Hammerspoon configuration to switch keyboard languages with shortcuts | |
| -- Table to keep track of the last modifiers and if another key was pressed | |
| local lastModifiers = {} | |
| local otherKeyPressed = false | |
| -- Function to handle single taps on modifier keys | |
| local function singleTapHandler(event) | |
| local newModifiers = event:getFlags() | |
| local keyCode = event:getKeyCode() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # ========================= | |
| # CONFIG (EDIT THIS) | |
| # ========================= | |
| SPOOLMAN_VERSION="v0.22.1" # see https://github.com/Donkie/Spoolman/tags | |
| # ========================= | |
| # INTERNALS |