Skip to content

Instantly share code, notes, and snippets.

@nkhine
nkhine / gist:f620f8bdc0fb613b7b59
Last active August 29, 2015 14:02
nginx.conf
#user nobody;
worker_processes 4;
worker_priority 15;
error_log logs/error.log notice;
pid logs/nginx.pid;
events {
use kqueue; # event method, kqueue for FreeBSD and OpenBSD
worker_connections 1024; # number of parallel or concurrent connections per worker_processes
}
☺ gulp serve 2.1.0 master f90b08a ✗""
[gulp] Using gulpfile ~/Sandboxes/Business/continentalclothing.com/node-blade-boiler-template/gulpfile.js
[gulp] Starting 'sass-dev'...
[gulp] Starting 'coffee-dev'...
[gulp] Starting 'nodemon'...
[gulp] Finished 'nodemon' after 984 ms
[gulp] [nodemon] v1.0.19
[gulp] [nodemon] to restart at any time, enter `rs`
[gulp] [nodemon] watching: *.*
[gulp] [nodemon] starting `node run.js`
☺ gulp serve 2.1.0 master f90b08a""
[gulp] Using gulpfile ~/Sandboxes/Business/continentalclothing.com/node-blade-boiler-template/gulpfile.js
[gulp] Starting 'sass-dev'...
[gulp] Starting 'coffee-dev'...
[gulp] Starting 'nodemon'...
[gulp] Finished 'nodemon' after 871 ms
[gulp] [nodemon] v1.0.19
[gulp] [nodemon] to restart at any time, enter `rs`
[gulp] [nodemon] watching: *.*
[gulp] [nodemon] starting `node run.js`
☺ npm list 2.1.0 master f95f43a ✗""
npm WARN unmet dependency /Users/khinester/Sandboxes/Business/continentalclothing.com/dev/node_modules/gulp-sass/node_modules/node-sass requires mocha@'1.18.x' but will load
npm WARN unmet dependency /Users/khinester/Sandboxes/Business/continentalclothing.com/dev/node_modules/mocha,
npm WARN unmet dependency which is version 1.19.0
node-express-blade@0.0.1 /Users/khinester/Sandboxes/Business/continentalclothing.com/dev
├─┬ assert@1.1.1
│ └─┬ util@0.10.2
│ └── inherits@2.0.1
├── async@0.6.2
├─┬ aws-sdk@2.0.0-rc.15 extraneous
dumpdev="AUTO"
zfs_enable="YES"
sshd_enable="YES"
local_unbound_enable=yes
ifconfig_igb0="inet 37.XXX.XXX.166 netmask 255.255.255.0 broadcast 37.XXX.XXX.255"
ifconfig_igb0_alias0="inet 178.XX.XX.6 netmask 255.255.255.255 broadcast 178.XX.XX.6"
# Custom loopback interface
cloned_interfaces="lo666"
ifconfig_lo666_alias0="inet 10.6.6.6 netmask 255.255.255.255"
ifconfig_lo666_alias1="inet 10.6.6.7 netmask 255.255.255.255"

FreeBSD 10 Nodejs setup with nginx, mongodb, redis and monit

This my receipe for installing a complete nodejs server on FreeBSD 10. The parameters used in this configuration are for a very small private server that I use for demo purpose only, so for a production server, you should somehow set the limits in pair with your ressources.

I use monit so I don't have to write rc scripts for node and it should take care of process lifecycle management for me. Alternatives exists such as supervisord or circus.

Installing mongodb

@nkhine
nkhine / gist:5917572
Created July 3, 2013 12:43
zukai, npm test
✖ 26 of 130 tests failed:
1) Default Plugins relation should allow missing relationship when minItems=0:
Error: timeout of 2000ms exceeded
at null.<anonymous> (/Users/khinester/Sandboxes/zukai/node_modules/mocha/lib/runnable.js:167:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
2) Default Plugins relation should not allow missing relationship when minItems=1:
Error: timeout of 2000ms exceeded
at null.<anonymous> (/Users/khinester/Sandboxes/zukai/node_modules/mocha/lib/runnable.js:167:14)
@nkhine
nkhine / index.html
Last active December 17, 2015 21:59 — forked from johan/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title>
<script src="http://mbostock.github.com/d3/d3.js"></script>
<script src="http://mbostock.github.com/d3/d3.geo.js"></script>
<style type="text/css">
svg {
@nkhine
nkhine / _.md
Created March 14, 2013 20:22
simple globe canvas
@nkhine
nkhine / _.md
Created March 14, 2013 20:20
simple globe canvas