Skip to content

Instantly share code, notes, and snippets.

View mrrooijen's full-sized avatar

Michael van Rooijen mrrooijen

View GitHub Profile

This is a shell script for backing up a configurable $path to your iCloud Drive or Dropbox folder for off-site storage. Backups are lzma compressed and gpg encrypted using your public gpg key. Additionally, backups are automatically rotated using $keep.

Prerequisites:

  • GPG public key
  • iCloud Drive or Dropbox

Procedure (assuming path=/Developer; storage=iCloud; keep=7):

  1. Creates archive of $HOME/Developer
@mrrooijen
mrrooijen / symlink.sh
Created March 29, 2016 23:08
iCloud Drive path.
@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 / rancher_nginx.conf
Created March 17, 2016 17:05
Example configuration for rancher nginx proxy with ssl termination.
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
server {
@mrrooijen
mrrooijen / Dockerfile
Created February 17, 2016 23:23
Example (minimalistic) Elixir Dockerfile (65mb image size).
FROM msaraiva/elixir-dev:1.2.2
ENV MIX_ENV=prod
ENV PORT=8080
RUN mkdir /app
WORKDIR /app
ADD config config
ADD lib lib
@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 --
@mrrooijen
mrrooijen / cloc.rb
Last active January 3, 2016 15:32
Homebrew Cloc formula with --HEAD support.
class Cloc < Formula
desc "Statistics utility to count lines of code"
homepage "https://github.com/AlDanial/cloc/"
url "https://github.com/AlDanial/cloc/releases/download/1.64/cloc-1.64.pl"
sha256 "79edea7ea1f442b1632001e23418193ae4571810e60de8bd25e491036d60eb3d"
head "https://github.com/AlDanial/cloc.git"
bottle :unneeded
def install
@mrrooijen
mrrooijen / cmd.sh
Last active August 18, 2017 10:38
iCloud Drive shortcut on Desktop.
ln -nfs "~/Library/Mobile Documents/com\~apple\~CloudDocs" "~/Desktop/iCloud Drive"