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
#!/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): |
#!/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. |
# 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 |
(setq testvar nil) | |
nil | |
(defmacro testmacro () | |
(if testvar "OMG, I passed the test!") | |
(pp "I failed! damn!"))) | |
testmacro | |
(setq test-simple (testmacro)) | |
"I failed! damn!""\"I failed! damn!\"" |
(setq kk/org-packages | |
'( | |
;; package kk/orgs go here | |
org | |
cdlatex | |
)) | |
;; List of packages to exclude. | |
(setq kk/excluded-packages '()) |
#These directories may be excluded: | |
# contains mounted file systems | |
.gvfs | |
.local/share/gvfs-metadata | |
# contains the actual encrypted home directory | |
.Private | |
# session-specific | |
.dbus | |
.cache |
# 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 |
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 |
* 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 |