Skip to content

Instantly share code, notes, and snippets.

View bedartha's full-sized avatar

Bedartha Goswami bedartha

View GitHub Profile
"""
Estimates power spectra from proxy record dataframes
====================================================
"""
# Last modified: Wed Nov 04, 2020 01:48pm
#
# Copyright (C) 2020 Bedartha Goswami <bedartha.goswami@uni-tuebingen.de>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
@bedartha
bedartha / sublimetext2_focusgroup_keybinding
Last active December 19, 2015 09:39
In Sublime Text 2, the default key bindings for Moving focus to a group (in a tiled view) is "Ctrl+1" and "Ctrl+2" and so on. this, however, immediately conflicts with the default key binding of OS X to switch between Desktops ("Spaces"). To change this, on can simply go to the the "Sublime Text 2" menu and to "Preferences > Key Bindings - User"…
[
{ "keys": ["super+ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["super+ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["super+ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["super+ctrl+4"], "command": "focus_group", "args": { "group": 3 } }
]
@bedartha
bedartha / fetchrunnningapps.py
Last active June 16, 2019 05:16
Fetch running apps and their icons on OS X using PyObjC
from AppKit import NSWorkspace
sharedWorkspace = NSWorkspace.sharedWorkspace()
launchedApps = sharedWorkspace.launchedApplications()
for liveApp in launchedApps:
appName = str(liveApp.allValues()[-1]
appPath = str(liveApp.allValues()[0])
appIcon = sharedWorkspace.iconForFile_(appPath)
icoPath = './' + appName + '.png'
appIcon.TIFFRepresentation().writeToFile_atomically_(icoPath, False)