Skip to content

Instantly share code, notes, and snippets.

View greentornado's full-sized avatar

Hai Nguyen greentornado

View GitHub Profile
@greentornado
greentornado / Readme.md
Created November 9, 2015 05:23 — forked from ChuckJHardy/Readme.md
ZeroMQ + Node.js + Socket.io + UI for sending message from Ruby to a Javascript UI running on Node.js

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

@greentornado
greentornado / sbt-benchmark.sh
Created January 3, 2016 16:05 — forked from patriknw/sbt-benchmark.sh
Example of sbt launch script for akka benchmarks
#!/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"
@greentornado
greentornado / nginxproxy.md
Created January 31, 2016 09:11 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

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

@greentornado
greentornado / Flask-blueprint-with-imported-routes
Created March 17, 2016 05:10 — forked from Jaza/Flask-blueprint-with-imported-routes
Example of how to split a Flask blueprint into multiple files, with routes in each file, and of how to register all those routes.
*
@greentornado
greentornado / atom_clojure_setup.md
Created July 11, 2016 15:45 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

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.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@greentornado
greentornado / setup-rabbitmq-cluster.sh
Created July 17, 2016 16:10 — forked from adilbaig/setup-rabbitmq-cluster.sh
A complete bash script to setup a RabbitMQ cluster from scratch. Takes user-defined servers at run time.
#!/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 :
@greentornado
greentornado / Sublime Text 3 Build 3103 License Key - CRACK
Created February 19, 2017 16:03
Sublime Text 3 Build 3103 License Key - CRACK
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
@greentornado
greentornado / better-nodejs-require-paths.md
Created March 21, 2017 03:47 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@greentornado
greentornado / SWebSocket.cpp
Created April 7, 2017 09:22 — forked from ysugimoto/SWebSocket.cpp
cocos2d-x simple websocket wrapper class
//
// SWebSocket.cpp
//
// Created by Yoshiaki Sugimoto on 2014/08/04.
//
//
#include "SWebSocket.h"
USING_NS_CC;
@greentornado
greentornado / curl.md
Created May 9, 2017 15:57 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.