Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb
Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb
#!/bin/sh | |
# Run the benchmark with this as sbt start script, | |
# but change the paths (/home/nordwall) | |
# ~/bin/sbt-benchmark.sh | |
# > project akka-actor-tests | |
# > test-only akka.performance.microbench.TellThroughputPerformanceSpec | |
export JAVA=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java | |
export FLAGS="-server -Dfile.encoding=UTF8 -XX:+UseNUMA -XX:+UseCondCardMark -XX:-UseBiasedLocking" |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
def tail(f, n, offset=None): | |
"""Reads a n lines from f with an offset of offset lines. The return | |
value is a tuple in the form ``(lines, has_more)`` where `has_more` is | |
an indicator that is `True` if there are more lines in the file. | |
""" | |
avg_line_length = 74 | |
to_read = n + (offset or 0) | |
while 1: | |
try: |
* |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
#!/bin/bash | |
set -e | |
# This script is part of my blog post : | |
# http://thoughtsimproved.wordpress.com/2015/01/03/tech-recipe-setup-a-rabbitmq-cluster-on-ubuntu/ | |
# It sets up a RabbitMQ cluster by connecting to user-provided master and slave servers | |
# and ringing them up to a cluster on the fly. | |
# RabbitMQ Clustering is described in detail here : |
🚀 crystal src/main.cr -- examples/sqlite3.cr | |
/usr/include/sqlite3.h:35:10: fatal error: 'stdarg.h' file not found | |
@[Link("sqlite3")] | |
lib LibSQLite3 | |
type Sqlite3 = Void* | |
fun open = sqlite3_open(filename : LibC::Char*, pp_db : Sqlite3*) : LibC::Int | |
fun open = sqlite3_open_v2(filename : LibC::Char*, pp_db : Sqlite3*, flags : LibC::Int, z_vfs : LibC::Char*) : LibC::Int | |
fun errcode = sqlite3_errcode(db : Sqlite3) : LibC::Int | |
fun errmsg = sqlite3_errmsg(x0 : Sqlite3) : LibC::Char* | |
type Sqlite3Stmt = Void* |
abby.ns.cloudflare.com | |
ben.ns.cloudflare.com |
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |