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.
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:foo@example.com", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
| def time[T](block: => T): T = { | |
| val start = System.currentTimeMillis | |
| val res = block | |
| val totalTime = System.currentTimeMillis - start | |
| println("Elapsed time: %1d ms".format(totalTime)) | |
| res | |
| } |
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
| (require '[clojure.core.async :refer [go alts! >! <! >!! <!! chan timeout]]) | |
| (defn buffered-chan | |
| "Reads from ch-source and if either timeout or the buffer-count has been | |
| read the result it sent to the channel thats returned from this function" | |
| ([ch-source buffer-count timeout-ms] | |
| (buffered-chan ch-source buffer-count timeout-ms 1)) | |
| ([ch-source buffer-count timeout-ms buffer-or-n] | |
| (let [ch-target (chan buffer-or-n)] | |
| (go |
Note: This was written in 2015, it may be out of date now.
There are a lot of commands here which I use
sudoif you don't know what you're doing withsudo, especially where Irmyou can severely screw up your system.
There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.
I intend this to be a living document, I have included suggestions from peoples' replies.
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
How to install pandoc from source on CentOS 6.x
Make a directory for the Haskell installation, I like to use
/opt/haskell:
$ sudo mkdir /opt/haskell
$ sudo chown $USER /opt/haskell
Install [GHC 7.6.3][1].
These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.