Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block mudivili

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mudivili / service-name.conf
Last active Aug 3, 2017
Sample Supervisord config
View service-name.conf
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
mudivili / nginx-websocket
Created May 28, 2017
nginx websocket reverse proxy
View nginx-websocket
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
upstream websocket {
server {
View RabbitMQ add user
sudo rabbitmqctl add_user username password
sudo rabbitmqctl set_permissions -p / username ".*" ".*" ".*"
sudo rabbitmqctl set_user_tags username administrator
mudivili / nginx
Created Aug 16, 2017 — forked from mockra/nginx
nginx config for static site
View nginx
server {
listen 80;
root /var/www/;
index index.html index.htm;
location / {
default_type "text/html";
View crud-constants.sublime-snippet
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';
View mocha-test.sublime-snippet
describe('#${1:methodName}', function f() {
describe('Positive tests', function f() {
before(function f(done) {
View server-crud-actions.sublime-snippet
export function create${1:ModelName}Response(data) {
actionType: constants.CREATE_${2:MODEL_NAME}_RESPONSE,
data: data
export function create${1:ModelName}Error(data) {
View server-action-response.sublime-snippet
export function ${1:server call}Response(data) {
actionType: constants.${2:CONSTANT_NAME}_RESPONSE,
data: data
export function ${1:server call}Error(data) {
View async-constant-so.sublime-snippet
export const ${1:SERVER_CALL_NAME} = '${1:SERVER_CALL_NAME}';
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
View Logger-helper
const pino = require('pino');
const config = require('config');
const logger = pino({level: config.logLevel});
exports.getLogger = function getLogger(module) {
return logger.child({ module: module });
exports.getMethodEndLogger = function getMethodEndLogger(logger, method, input) {
You can’t perform that action at this time.