Skip to content

Instantly share code, notes, and snippets.

View chriscantu's full-sized avatar

Chris chriscantu

  • Babylon Health
  • Austin, TX
View GitHub Profile
@chriscantu
chriscantu / app.js
Last active December 30, 2015 07:49
Restify - Hello World Example; #To Run:# 1. Copy file into a directory 2. Run `npm install restify` in the directory with app.js
var restify = require('restify'),
server = restify.createServer({
name: 'Hello World'
});
server.use(restify.gzipResponse());
var respond = function (req, res, next) {
res.send(200, {hello:'world'});
next();
function camelCase(input) {
return input.toLowerCase().replace(/-(.)/g, function(match, group1) {
return group1.toUpperCase();
});
}
@chriscantu
chriscantu / migrate.sh
Created August 19, 2013 21:56
Rsync Script to Migrate Linux Servers. All the heavy lifting was done here. (http://www.mariusv.com/migrate-linux-servers-across-cloud-providers/) I just added more system directories to be ignored for Ubuntu and other flavors.
#!/bin/bash
# @Description MigrateME
# @Usage Copy to the source server and run with: sh migrateMe.sh
# @Version 1.0.2
# @Date Last Modified 22/01/2011
# @Author Marius Voila <http://www.mariusv.com>
# @Copyright (c) 2011 mariusv under GNU GPL v2.0+
# @Returns success or failure
function is_root_user() {