This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3. | |
# Requirements: | |
# | |
# 1. Docker | |
# | |
# $ curl -fsSL https://get.docker.com/ | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Generates, encrypts, transfers and rotates Gitlab backups to/on Amazon S3. | |
# Requirements: | |
# | |
# 1. Gitlab | |
# | |
# $ apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------- | |
-- 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 -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------- | |
-- 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 | |
------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------- | |
-- 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 -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/codegangsta/negroni" | |
"github.com/julienschmidt/httprouter" | |
"net/http" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COUNTRIES = { | |
"US": "United States", | |
"AF": "Afghanistan", | |
"AX": "Åland Islands", | |
"AL": "Albania", | |
"DZ": "Algeria", | |
"AS": "American Samoa", | |
"AD": "Andorra", | |
"AO": "Angola", | |
"AI": "Anguilla", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 1 > /proc/sys/vm/overcommit_memory |