Skip to content

Instantly share code, notes, and snippets.

View ceremcem's full-sized avatar

Cerem Cem ASLAN ceremcem

View GitHub Profile
@ceremcem
ceremcem / websocket_proxy_params
Last active September 5, 2015 13:41
Nginx proxy node.js socket.io app
# this is the necessary configurations for
# proxying a socket.io Node.js application with Nginx
#
# check for updates at: https://gist.github.com/ceremcem/5176ac7215b5b669f601
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
EnterNotify event, serial 32, synthetic NO, window 0x1000001,
root 0x101, subw 0x0, time 5235594, (67,569), root:(67,569),
mode NotifyNormal, detail NotifyInferior, same_screen YES,
focus YES, state 0
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
MotionNotify event, serial 32, synthetic NO, window 0x1000001,
@ceremcem
ceremcem / broker.js
Last active August 29, 2015 14:27 — forked from jedi4ever/broker.js
xsub , xpub example in nodejs
var pubListener = 'tcp://127.0.0.1:5555';
var subListener = 'tcp://127.0.0.1:5556';
var hwm = 1000;
var verbose = 0;
// The xsub listener is where pubs connect to
var subSock = zmq.socket('xsub');
subSock.identity = 'subscriber' + process.pid;
subSock.bindSync(subListener);
@ceremcem
ceremcem / debian-scratch-sources.list
Created July 30, 2015 07:06
/etc/apt/sources.list for Debian Scratch
#
# deb http://ftp.debian.org/debian/ jessie-updates main
# deb-src http://ftp.debian.org/debian/ jessie-updates main
# jessie-backports, previously on backports.debian.org
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-backports main