Skip to content

Instantly share code, notes, and snippets.

Joshua Elson joshelson

Block or report user

Report or block joshelson

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
View Building Blink on OS X.md
View gist:574b7854154df41081044f89824175f2
### Keybase proof
I hereby claim:
* I am joshelson on github.
* I am joshelson (https://keybase.io/joshelson) on keybase.
* I have a public key ASDNxvao3JDENSLrWmnNaaR5EgYp-tnH-5oJVBSZVDJceAo
To claim this, I am signing this object:
@joshelson
joshelson / pbx_spool.c.patch
Created Nov 28, 2016
Patch for OUTGOING_RETRY in Asterisk
View pbx_spool.c.patch
--- pbx_spool.orig.c 2016-11-09 03:21:38.017426604 +0300
+++ pbx_spool.patched.c 2016-11-11 03:45:55.484474036 +0300
@@ -298,6 +298,23 @@
ast_log(LOG_WARNING, "At least one of app or extension must be specified, along with tech and dest in file %s\n", o->fn);
return -1;
}
+ char* r;
+ if (asprintf(&r, "%d", o->retries + 1) >= 0) {
+ var = ast_variable_new("OUTGOING_RETRY", r, o->fn);
+ if (var) {
@joshelson
joshelson / logger.js
Last active Aug 29, 2017 — forked from rtgibbons/logger.js
Logger Library with winston
View logger.js
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 — forked from prantlf/logger.js
Logger Library with winston - Fixed for additional log arguments
View logger.js
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 Sep 1, 2015 — 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.
View percona-xtrabackup.sh
#!/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
You can’t perform that action at this time.