This is an OS X-centric configuration.
The idea here is to use environment variables, loaded via aliases to mutt, to control which account you're loading. Years ago I had all of my accounts configured to be accessible from a single mutt
| # Tell system when Xcode utilities live: | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| # Set "opendiff" as the default mergetool globally: | |
| git config --global merge.tool opendiff |
This is an OS X-centric configuration.
The idea here is to use environment variables, loaded via aliases to mutt, to control which account you're loading. Years ago I had all of my accounts configured to be accessible from a single mutt
| # force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf | |
| server { | |
| listen 80; | |
| server_name jira.example.com; | |
| access_log off; | |
| return 301 https://$server_name$request_uri; | |
| } | |
| # /etc/nginx/conf.d/jira.conf | |
| server { |
| """ | |
| Add copy to clipboard from IPython! | |
| To install, just copy it to your profile/startup directory, typically: | |
| ~/.ipython/profile_default/startup/ | |
| Example usage: | |
| %clip hello world | |
| # will store "hello world" |
| When running "pip install m2crypto" in a virtualenv, I got the following error: | |
| Downloading/unpacking m2crypto | |
| Running setup.py egg_info for package m2crypto | |
| Installing collected packages: m2crypto | |
| Running setup.py install for m2crypto | |
| building 'M2Crypto.__m2crypto' extension | |
| swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c | |
| swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i |
| #!/usr/bin/env bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Copyright 2013 Brent O'Connor | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
| } |
| -- Adapted from these sources: | |
| -- http://peterdowns.com/posts/open-iterm-finder-service.html | |
| -- https://gist.github.com/cowboy/905546 | |
| -- | |
| -- Modified to work with files as well, cd-ing to their container folder | |
| on run {input, parameters} | |
| tell application "Finder" | |
| set my_file to first item of input | |
| set filetype to (kind of (info for my_file)) | |
| -- Treats OS X applications as files. To treat them as folders, integrate this SO answer: |
| from UserDict import IterableUserDict | |
| import collections | |
| __author__ = 'github.com/hangtwenty' | |
| def tupperware(mapping): | |
| """ Convert mappings to 'tupperwares' recursively. |
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals, absolute_import, division | |
| import pytest | |
| from django_webtest import DjangoTestApp, WebTestMixin | |
| class Stub(object): | |
| """Stub methods, keep track of calls.""" |
| /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
| /* ========================================================================== | |
| HTML5 display definitions | |
| ========================================================================== */ | |
| /** | |
| * Correct `block` display not defined in IE 8/9. | |
| */ |