Skip to content

Instantly share code, notes, and snippets.

<snippet>
<content><![CDATA[
describe('#${1:methodName}', function f() {
describe('Positive tests', function f() {
before(function f(done) {
done();
});
<snippet>
<content><![CDATA[
export const CREATE_${1:this} = 'CREATE_${1:this}';
export const CREATE_${1:this}_RESPONSE = 'CREATE_${1:this}_RESPONSE';
export const CREATE_${1:this}_ERROR = 'CREATE_${1:this}_ERROR';
export const UPDATE_${1:this} = 'UPDATE_${1:this}';
export const UPDATE_${1:this}_RESPONSE = 'UPDATE_${1:this}_RESPONSE';
export const UPDATE_${1:this}_ERROR = 'UPDATE_${1:this}_ERROR';
export const FETCH_${1:this}S = 'FETCH_${1:this}';
export const FETCH_${1:this}S_RESPONSE = 'FETCH_${1:this}_RESPONSE';
@mudivili
mudivili / nginx
Created August 16, 2017 00:18 — forked from mockra/nginx
nginx config for static site
server {
listen 80;
root /var/www/yourdomain.com/public;
index index.html index.htm;
server_name yourdomain.com;
location / {
default_type "text/html";
sudo rabbitmqctl add_user username password
sudo rabbitmqctl set_permissions -p / username ".*" ".*" ".*"
sudo rabbitmqctl set_user_tags username administrator
@mudivili
mudivili / nginx-websocket
Created May 28, 2017 07:42
nginx websocket reverse proxy
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket {
server 127.0.0.1:3001;
}
server {
@mudivili
mudivili / service-name.conf
Last active August 3, 2017 07:14
Sample Supervisord config
[program:service-name]
numprocs=1
process_name=%(process_num)02d
command = /usr/local/bin/node index.js
directory = /path/to/project
autostart = true
autorestart = true
environment = NODE_PATH="."
user = ubuntu
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log