Skip to content

Instantly share code, notes, and snippets.

View mrrooijen's full-sized avatar

Michael van Rooijen mrrooijen

View GitHub Profile
@mrrooijen
mrrooijen / rancher
Last active July 15, 2016 14:04
Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3.
#! /bin/bash
# Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3.
# Requirements:
#
# 1. Docker
#
# $ curl -fsSL https://get.docker.com/ | sh
@mrrooijen
mrrooijen / gitlab_backup
Last active May 27, 2016 13:25
Generates, encrypts, transfers and rotates Gitlab backups to/on Amazon S3.
#! /bin/bash
# Generates, encrypts, transfers and rotates Gitlab backups to/on Amazon S3.
# Requirements:
#
# 1. Gitlab
#
# $ apt-get update
@mrrooijen
mrrooijen / openvpn_installer
Last active June 9, 2020 13:42
Installs OpenVPN
#!/bin/bash
# OpenVPN Installer
#
# This installer was designed to work with Ubuntu 14.04. It installs
# an OpenVPN server, generates an associated OpenVPN client configuration file,
# configures a firewall, and enables automatic security updates.
#
# Once the installer finishes, the `/root/client.ovpn` file will have been generated.
# Download this file to your local machine and open it in an OpenVPN client and you'll
@mrrooijen
mrrooijen / HackerNewsExample.elm
Created January 22, 2016 20:16 — forked from TheSeamau5/HackerNewsExample.elm
Hacker news requests example
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Task exposing (Task, ThreadID, andThen, sequence, succeed, spawn)
import Json.Decode exposing (Decoder, list, int, string, (:=), map, object2)
import Signal exposing (Signal, Mailbox, mailbox, send)
import List
---------------------------------
-- THIRD PARTY LIBRARY IMPORTS --
@mrrooijen
mrrooijen / artistSearchExample.elm
Created January 22, 2016 20:16 — forked from TheSeamau5/artistSearchExample.elm
Artist Search Example
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Json.Decode as Decode exposing (Decoder, object2, map, string, list, (:=))
import Task exposing (Task, andThen, succeed, fail, onError)
import Signal exposing (Signal, Mailbox, mailbox, message, send)
import String
-------------------------
@mrrooijen
mrrooijen / RedditHomePage.elm
Created January 22, 2016 20:16 — forked from TheSeamau5/RedditHomePage.elm
Getting the Reddit Home Page using Elm Promises
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Task exposing (Task, succeed, andThen, onError)
import Json.Decode exposing (Decoder, object2, (:=), string, int, list, map)
import Signal exposing (Signal, Mailbox, mailbox, send)
import List
---------------------------------
-- THIRD PARTY LIBRARY IMPORTS --
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/julienschmidt/httprouter"
"net/http"
)
func main() {
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@mrrooijen
mrrooijen / countries.js
Last active May 27, 2016 13:27
A list of country codes and names
COUNTRIES = {
"US": "United States",
"AF": "Afghanistan",
"AX": "Åland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
@mrrooijen
mrrooijen / out-of-memory.sh
Last active August 29, 2015 14:08
Dokku Information
echo 1 > /proc/sys/vm/overcommit_memory