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.
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
## Select a tmux session from a given tmux server and attach to it. | |
TSERVER=$1 | |
SSTRING=$(if [ $TSERVER ]; then echo "-L $TSERVER"; else echo ""; fi) | |
SESSIONS=$(tmux $SSTRING ls|sed -E 's/^(.*?): .*/\1/'|xargs echo) | |
TSERVER=$(if [ $TSERVER ]; then echo $TSERVER; else echo "the default server"; fi) | |
echo "Available sessions on $TSERVER:" | |
select opt in $SESSIONS "Quit"; do | |
case $opt in |
#!/bin/bash | |
set -o errexit | |
## Some packages kill the proces sdue to cyclic dependencies, etc. | |
IGNORE="<[-.a-zA-Z0-9]*> dpkg perl-base libaudit1 libdb5.1" | |
## User entered packages to search dependencies for. | |
DEPS=$@ |
## Add a given path component ($2) to the given path variable ($1). | |
pextend () | |
{ | |
local pvar=$1 | |
local p=$(eval "echo \$$pvar") | |
local dname=$2 | |
if [ -d $dname ] ; then | |
case $p in | |
*${dname}* ) return ;; | |
* ) eval "${pvar}=\"${dname}:${p}\"" ;; |
* 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 |