Skip to content

Instantly share code, notes, and snippets.

View samrocksc's full-sized avatar
:shipit:
LFG

Sam Clark samrocksc

:shipit:
LFG
View GitHub Profile
@samrocksc
samrocksc / hapijs-rest-api-tutorial.md
Last active August 29, 2015 14:28 — forked from agendor/hapijs-rest-api-tutorial.md
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@samrocksc
samrocksc / hapiExample.js
Last active August 28, 2015 21:42 — forked from nvcexploder/hapiExample.js
basic hapi.js example highlighting HTTP methods and a few request parameters
/*
For this to run, ensure that `npm install hapi` has happened in your directory
setup whilst writing this:
iojs v. 1.0.5
hapi 8.2.0
*/
var Hapi = require('hapi');
@samrocksc
samrocksc / cors.js
Created September 15, 2015 17:39 — forked from monteslu/cors.js
hapi cors
{
method: 'POST',
path: '/dostuff',
config: {
auth: false,
cors: {
additionalHeaders: ['accept']
},
handler: handleStuff
}
@samrocksc
samrocksc / tmux.conf
Created October 29, 2015 16:25 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000