Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| function cd { | |
| if [ -f "$1" ]; then | |
| # Sometimes I drag-n-drop files onto the terminal because it's easy | |
| # so I can 'cd <filename>' and have it cd to the parent directory of that file | |
| builtin cd "`dirname \"$1\"`" | |
| elif [ $# == 0 ]; then | |
| # If a virtualenv is activated then a no-parameter 'cd' will take you | |
| # to the virtualenv root. | |
| if [ -n $VIRTUAL_ENV ]; then | |
| builtin cd $VIRTUAL_ENV |
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 -x | |
| trap read debug | |
| < YOUR CODE HERE > |
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 re,collections | |
| def sort_naturally(l): | |
| """ Sort the given list in the way that humans expect. | |
| """ | |
| convert = lambda text: int(text) if text.isdigit() else text | |
| alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key[0])] | |
| l.sort( key=alphanum_key ) | |
| return l | |
| collections.OrderedDict(sort_naturally(a_dict.items())) |
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
| # Change {0,0} to pick the relative date range to search, i.e. {3,5} searches 3-5 days ago. | |
| # Change <hostname> to be the base name used in naming your Maildir files | |
| for i in {0..0}; do find . -name \*<hostname>\* -mtime $i -exec grep -m1 -Hi "^Subject:" {} \; ; done |