pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image
#!/bin/bash | |
# From http://emptysquare.net/blog/syntax-highlighting-with-pycharm-pygments-and-keynote/ | |
/usr/local/bin/pygmentize -f rtf -O "style=friendly,fontface=Courier Bold" "$1" | pbcopy |
(defproject vix "1.0.0-SNAPSHOT" | |
:description "Vix is a document repository and management system." | |
:dependencies [[org.clojure/clojure "1.4.0"] | |
[org.clojure/data.codec "0.1.0"] | |
[org.clojure/data.json "0.1.2"] | |
[org.clojure/algo.generic "0.1.0"] | |
[slingshot "0.10.3"] | |
[org.mindrot/jbcrypt "0.3m"] | |
[compojure "1.1.0"] | |
[ring/ring-core "1.1.1"] |
I 'm fleshing out some of these ideas here: https://github.com/lynaghk/todoFRP/tree/master/todo/angular-cljs
#!/bin/bash | |
#http://pygments.org/docs/cmdline/ | |
LANG="ruby" | |
if [ -n "$2" ] | |
then | |
LANG=$2; | |
fi |
# Directory: | |
# root@localhost:~/flume/apache-flume-1.4.0-SNAPSHOT | |
# Usage: | |
# bin/flume-ng agent --conf ./conf/ -f conf/flume-agents-tests.conf -Dflume.root.logger=DEBUG,console -n agent_test_exec_TO_hdfs | |
# ------------------------------------------------------------------------------------ | |
# This workflow applies to some WebServer running flume agent and dumping data | |
# back in HDFS. Here /tmp/ping.txt could be any log file. | |
# ------------------------------------------------------------------------------------ |
When you build Erlang/OTP on OS X, it unfortunately defaults to handling a maximum of 1024 file descriptors. You can get around this limitation with the right combination of configuration options and manual changes to a generated config file.
First, go into your unpacked Erlang/OTP source directory and run the following command, replacing the value 10000 with whatever value you want for max file descriptors:
perl -i -pe 's/(define\s+FD_SETSIZE\s+)\d+/\1 10000/' erts/config.h.in
Next, when you run configure
in your Erlang/OTP source directory, be sure to include the right CFLAGS
setting, as shown below:
CFLAGS='-DREDEFINE_FD_SETSIZE -DFD_SETSIZE=15000 -D_DARWIN_UNLIMITED_SELECT' ./configure --enable-kernel-poll <other options>
I just stubmled upon an issue in my app where a user can go to edit his profile, but instead of saving the form he just leaves to another page where he can post a status (User
has many Status
es).
But to make sure that he's just posting a status and not committing something else I want to put that status into a separate transaction
createStatus: function() {
var transaction = this.get("store").transaction(),
text = this.get("text"),
TL;DR: gproc probably isn't what you need, but OTP's global module will probably work fine.
gproc [1][1] has a module gproc_dist that uses gen_leader [2][2] for coordination, no mnesia is involved. Some of the details for how it was originally designed are in Ulf's paper on it [3][3].
The significant disadvantages are:
- The node list by default must be static and known at start time! This will make expanding the cluster a non-starter without changes to gproc and/or gen_leader. There appears to be some experimental/undocumented way to expand a cluster that might work [4][4]
- There might be incorrect logic for net-splits (either detection or resolution) [5][5]
There doesn't appear to be a better global process registry available. The only other one I was able to find easily was ngproc [6][6] which suffers from the same sort of limitations and doesn't seem to be actively maintained.
bind-key -temacs-copy c copy-selection | |
bind-key -temacs-copy x copy-pipe "reattach-to-user-namespace /usr/bin/pbcopy" | |
bind-key -temacs-copy z copy-pipe "mate" |