How to inform Eclipse and other Mac applications of the command line PATH
- Update Mac OS X's notion of
PATH.
$ defaults write ~/.MacOSX/environment PATH "`echo $PATH`"
$ echo "setenv PATH $PATH" | sudo tee /etc/launchd.conf
- Restart Mac OS X.
| # Thanks to @samsonjs for the cleaned up version: | |
| # https://gist.github.com/samsonjs/4076746 | |
| PREFIX=$HOME | |
| VERSION=1.2.3 | |
| # Install Protocol Buffers | |
| wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
| tar -xf protobuf-2.4.1.tar.bz2 | |
| cd protobuf-2.4.1 |
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| # == Synopsis | |
| # Requires the terminal-notifier gem ([sudo] gem install terminal-notifier) | |
| # growlnotify wrapper to turn Growl alerts into Mountain Lion notifications | |
| # Uses growlnotify option syntax to keep your old scripts working with the new shiny. | |
| # | |
| # If you use Growl via growlnotify in your shell scripting, this script | |
| # will replace Growl's alerts with Mountain Lion notifications. |
| #!/usr/bin/env python | |
| # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
| # Written by Nathan Hamiel (2010) | |
| from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
| from optparse import OptionParser | |
| class RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
How to inform Eclipse and other Mac applications of the command line PATH
PATH.$ defaults write ~/.MacOSX/environment PATH "`echo $PATH`"
$ echo "setenv PATH $PATH" | sudo tee /etc/launchd.conf
Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.
Features:
'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist
| * Generate classes like WhereNot automatically with class decorator? | |
| * Haskell style deconstruction, perhaps like: | |
| @pmatch | |
| def count(first_arg=Match(x=Head, *xs=Rest)): | |
| print x, xs | |
| Will require some nasty hacks like https://github.com/smcq/python-inject | |
| * Implement boolean operators for stuff like: | |
| @pmatch |
| import gevent | |
| import gevent.pool | |
| class GroupWithExceptionCatching(gevent.pool.Group): | |
| def __init__(self, *args): | |
| super(GroupWithExceptionCatching, self).__init__(*args) | |
| self._error_handlers = {} | |
| def _wrap_errors(self, func): | |
| """Wrap a callable for triggering error handlers |
| # Object-oriented API | |
| # | |
| # Memory usage (iteration, object count, memory size) | |
| # 100 5637 1562216 | |
| # 200 5529 1491528 | |
| # 300 5422 1426264 | |
| # 400 5758 1587376 | |
| # 500 5422 1426288 | |
| # 600 5416 1440456 | |
| # 700 5610 1515056 |