Skip to content

Instantly share code, notes, and snippets.

View joshelson's full-sized avatar

Joshua Elson joshelson

View GitHub Profile
#!KAMAILIO
# Copyright (c) 2007-2010 by 4PSA, Inc
# All rights reserved
# This file is used to define the interaction between Kamailio and VoipNow
# DO NOT MAKE ANY CHANGES TO THIS FILE!
# ------------------------------------------ global configuration parameters -----------------------
debug=-1 # debug level (cmd line: -dddddddddd)
@joshelson
joshelson / logger.js
Last active August 29, 2017 07:51 — forked from rtgibbons/logger.js
Logger Library with winston
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
@joshelson
joshelson / logger.js
Last active May 24, 2016 02:00 — forked from prantlf/logger.js
Logger Library with winston - Fixed for additional log arguments
var app = require(process.cwd() + '/app');
var winston = require('winston');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
crit: 'red',
@joshelson
joshelson / percona-xtrabackup.sh
Last active September 1, 2015 03:23 — forked from jaygooby/percona-xtrabackup.sh
Call via crontab on whatever schedule suits you; keep n full mysql Percona xtrabackups of your mysql database, with binary logs applied. Also does a full mysqldump that can then have the binary logs applied to restore to a point-in-time backup via the binlogs. Copy all of this (backup, mysqldump, binlogs) to S3.
#!/bin/bash
#
# Carries out a full mysqldump, calls percona-xtrabackup and then
# copies the sql dump, the percona backup and your mysql bin logs
# to S3 using s3cmd http://s3tools.org/s3cmd
#
# TODO: extract out the S3 backup stuff to make it optional, and so
# other s3 programs can replace the s3cmd call.
# TODO: the if [ $? == 0 ] alert blocks should be a function
# TODO: make the if [ $? == 0 ] if [ $? != 0 ] more consistent - test