(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
dependencies: | |
cache_directories: | |
- "~/zookeeper-3.4.5" | |
- "~/kafka_2.8.0-0.8.0" | |
pre: | |
- "[[ -d ~/zookeeper-3.4.5 ]] || ( curl -L -o ~/zookeeper.tar.gz 'http://mirror.cogentco.com/pub/apache/zookeeper/current/zookeeper-3.4.5.tar.gz' && tar -xz -C ~ -f ~/zookeeper.tar.gz )" | |
- "[[ -d ~/kafka_2.8.0-0.8.0 ]] || ( curl -L -o ~/kafka.tar.gz 'http://mirror.metrocast.net/apache/kafka/0.8.0/kafka_2.8.0-0.8.0.tar.gz' && tar -xz -C ~ -f ~/kafka.tar.gz )" | |
- cp ~/zookeeper-3.4.5/conf/zoo_sample.cfg ~/zookeeper-3.4.5/conf/zoo.cfg | |
- ~/zookeeper-3.4.5/bin/zkServer.sh start |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"html/template" | |
"github.com/gorilla/sessions" |
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.
We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.
It should be generic enough to work on any elixir app using mix.
If you have a elixir_buildpack.config
, then enable that section in the build script to keep versions in sync!
// Array literal (= []) is faster than Array constructor (new Array()) | |
// http://jsperf.com/new-array-vs-literal/15 | |
var array = []; | |
// Object literal (={}) is faster than Object constructor (new Object()) | |
// http://jsperf.com/new-array-vs-literal/26 | |
var obj = {}; | |
// property === undefined is faster than hasOwnProperty(property) | |
// http://jsperf.com/hasownproperty-vs-in-vs-undefined/17 |
Custom recipe to get full Node.js Cloud Environment in DigitalOcean Dokku droplet running from scratch. Yes. Your own Heroku for $5 per month.
I use this gist to keep track of the important configuration steps required to have a functioning system after fresh install.
When you have executed that's all step by step you will get a new working and stable system which is ready to host & serve your Node.js application and databases.
Dear XCorp / Hi, XCorp depending on familiarity
I'm writing in response to X, where you advertised a vacancy for Y. I am interested in applying for this role -- please find my CV attached.
My current employment position is X, which means I'm responsible for delivering/organising/producing A, B, and C. I was previously the Y at Z where I did D. My main responsibility / largest project here has been P, which is a Widget that produces Doo-dads.
While I enjoy working at X for reasons K and L, I find M frustrating. I'm also looking to move on into areas such as N, P and Q, without losing touch with K. I find K valuable but I would prefer to change my working environment to include P.
I'm particularly interested in XCorp because, as well as providing the career experience I'm after, I use your product / admire your work / look up to your staff for these reasons: ...
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)