Skip to content

Instantly share code, notes, and snippets.

View kn9ts's full-sized avatar
🌠
I am one with the force!

Eugene Mutai kn9ts

🌠
I am one with the force!
View GitHub Profile

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.

This write-up owes a great deal to dscape's Node.js Deployments with Docker, Dokku, & Digital Ocean, the dokku project itself, and the fine folks working on dokku's issues. I took dscape's article as a starting point when trying this out but found some details lacking so I documented my own process for getting dokku up and running.

1. Get a domain

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.

This write-up owes a great deal to dscape's Node.js Deployments with Docker, Dokku, & Digital Ocean, the dokku project itself, and the fine folks working on dokku's issues. I took dscape's article as a starting point when trying this out but found some details lacking so I documented my own process for getting dokku up and running.

1. Get a domain

// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@kn9ts
kn9ts / interpolate.js
Last active August 29, 2015 14:20 — forked from cowboy/interpolate.js
// Uber-basic templating.. good? bad? ugly?
function interpolate( str, data ) {
data = data || window;
return !str
? ''
: str.replace( /{([^}]*)}/g, function(a,b){
return data[ b ] || '';
});
};
@kn9ts
kn9ts / tim.js
Last active August 29, 2015 14:20 — forked from bruntonspall/tim.js
/*
== Tim ==
A tiny JavaScript micro-templating script.
http://gist.github.com/521352
You can use Tim to write simple templates that use JavaScript's
familiar dot notation to replace template tags with JSON object
properties.
@kn9ts
kn9ts / in_array.go
Created July 16, 2015 06:57 — forked from anonymous/untitled
// Function to check if the the string given is in the array
inArray := func(str string, list []string) bool {
for _, v := range list {
if v == str {
return true
}
}
return false
}
@kn9ts
kn9ts / app.js
Last active September 7, 2015 10:01 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@kn9ts
kn9ts / AngularJS-ES6-Test-Skeleton
Created October 8, 2015 15:45 — forked from busypeoples/AngularJS-ES6-Test-Skeleton
AngularJS - Karma, Jasmine, Browserify, Stringify - ES6 Test Setup
We couldn’t find that file to show.
@kn9ts
kn9ts / karma.conf.js
Created December 15, 2015 08:25 — forked from koba04/.gitignore
karma + mocha + browserify + babel + power-assert
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'browserify'],
@kn9ts
kn9ts / basicServiceWorker.js
Created March 28, 2016 12:51 — forked from adactio/basicServiceWorker.js
A basic Service Worker, for use on, say, a blog.
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function() {
// Update 'version' if you need to refresh the cache
var staticCacheName = 'static';
var version = 'v1::';