Skip to content

Instantly share code, notes, and snippets.

View dsaran's full-sized avatar

Daniel Saran dsaran

  • Amazon
  • United States
View GitHub Profile
@dsaran
dsaran / getpid.sh
Created February 14, 2014 16:01
Get PID of a window on X
xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/_NET_WM_PID\(CARDINAL\)/{print $NF}'
@dsaran
dsaran / eclipse.sublime-keymap
Created April 11, 2014 18:03
Sublime Text - Eclipse keybindings
[
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+alt+j"], "command": "join_lines" },
{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" },
{ "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+shift+s"], "command": "save_all" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["shift+ctrl+f4"], "command": "close_all" },
@dsaran
dsaran / .pythonrc
Created May 9, 2016 14:49
python autocomplete
# Remember to add env variable PYTHONSTARTUP=~/.pythonrc
import rlcompleter
import readline
readline.parse_and_bind("tab: complete")