Skip to content

Instantly share code, notes, and snippets.

View shiftycow's full-sized avatar

Michael Harris shiftycow

View GitHub Profile
@shiftycow
shiftycow / dict_sort.py
Created May 19, 2014 22:11
An example of sorting complicated objects using a key dictionary
#!/usr/bin/env python
l = [
{'id':1,'val':'foo'}
,{'id':2,'val':'bar'}
,{'id':3,'val':'zig'}
,{'id':4,'val':'zig'}
,{'id':5,'val':'bar'}
]
print l
@shiftycow
shiftycow / OSX Keymap
Last active August 29, 2015 14:17
Sublime Text 3 Settings
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }
,{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }
,{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} }
,{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } }
]
@shiftycow
shiftycow / Visual Studio Code Settings
Created April 22, 2017 19:58
My boilerplate Visual Studio Code user settings
// Place your settings in this file to overwrite the default settings
{
"python.linting.pylintEnabled": false,
"python.linting.pep8Enabled": true,
"editor.renderWhitespace": "all",
"git.autofetch": false,
"git.autorefresh": false,
"diffEditor.ignoreTrimWhitespace": false,
"files.trimTrailingWhitespace": true,
"files.eol": "\n",