I hereby represent that all present, past and future contributions are governed by the Creative Commons Zero 1.0 Universal copyright statement, placing my contributions in the publicdomain. This entails that to the extent possible under law I waive all copyright and related or neighboring rights to the code or documents I contribute. I also represent that I have the authority to perform the above waiver with respect to the entirety of my contributions.
This file contains 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
" props to https://dougblack.io/words/a-good-vimrc.html | |
syntax on " enable syntax processing | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set expandtab " tabs are spaces | |
set number " show line numbers | |
set showcmd " show command in bottom bar | |
set cursorline " highlight current line | |
filetype indent plugin on " load filetype-specific indent files |
This file contains 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
#code gist, courtesy of Jabba Laci | |
#sauce: https://pythonadventures.wordpress.com/2012/12/08/raise-a-timeout-exception-after-x-seconds/ | |
import signal | |
import time | |
def test_request(arg=None): | |
"""Your http request.""" | |
time.sleep(2) | |
return arg | |
This file contains 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
# set volume from command line | |
# install by placing in home directory and running `chmod +x setvolume.py; echo 'python3 ~/setvolume.py' > .bashrc` | |
# CLI usage - sets volume level to 120%: `setvol 120` | |
from sys import argv | |
from subprocess import call | |
call('pactl set-sink-volume 0 ' + argv[1] + '%', shell=True) |
This file contains 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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "capslock", | |
"command": "deleteLeft", | |
"when": "textInputFocus", | |
}, | |
{ | |
"key": "ctrl+pagedown", | |
"command": "workbench.action.terminal.focusNext", |