Skip to content

Instantly share code, notes, and snippets.

@lekhnath
lekhnath / post-receive
Created September 25, 2015 14:32 — forked from tlrobinson/post-receive
Super simple git post-receive hook for Node.js + nvm + npm + node-foreman + init (Ubuntu) deployment
#!/usr/bin/env bash
set -u
set -e
export GIT_WORK_TREE="/var/www/example.com"
export NODE_VERSION="0.10"
echo "--> Checking out..."
git checkout -f
@lekhnath
lekhnath / nginx.conf
Last active September 18, 2015 07:45 — forked from thomasfr/nginx.conf
nginx vhost / site config file
upstream node_backend {
server 127.0.0.1:3000;
keepalive 32;
}
server {
root /var/www/testapp/public;
index index.html;
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@lekhnath
lekhnath / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var exec = require('child_process').exec;
var fs = require('fs');
var util = require('util');
var http = require('http');
var url = require('url');
var PDFDocument = require('pdfkit'); // http://pdfkit.org/
http.createServer(function (req, res) {
function slugify(text)
{
return text && text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, '') // Trim - from end of text
|| text;
}

Responsive Bootstrap 3 Timeline

Responsive Bootstrap Timeline with JackInTheBox and Animate.css

A Pen by MrPirrera on CodePen.

License.