View countries.json
{
"AF": "Afghanistan",
"AX": "AlandIslands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "AmericanSamoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
View rancher.sh
# Install Docker
curl -fsSL https://get.docker.com/ | sh
# Run Rancher
docker run -d \
--name=rancher \
--restart=always \
-v /var/lib/mysql:/var/lib/mysql \
-p 8080:8080 \
rancher/server:stable
View global_register.ex
defmodule Party.Clock do
use GenServer
def start_link do
case GenServer.start_link(__MODULE__, [], name: {:global, __MODULE__}) do
{:ok, pid} ->
{:ok, pid}
{:error, {:already_started, pid}} ->
IO.puts("Already started!!")
Process.link(pid)
View ssh_config
Host *
ServerAliveInterval 60
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
View check.sh
speedometer -r eth0 -t eth0
View gencert
#! /bin/sh
if [ "$1" == "" ]; then
echo ""
echo "SSL Certificate Generator (self-signed, requires openssl)."
echo ""
echo " Usage:"
echo ""
echo " gencert <days> # Produces server.key and server.crt"
echo ""
View sys.go
package main
import (
"fmt"
"syscall"
)
const (
B = 1
KB = 1024 * B
View cmd.sh
sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25
View heroku_pg_backup
#! /bin/bash
# Fetches, encrypts, transfers and rotates Heroku Postgres backups to/on Amazon S3.
# Requirements:
#
# 1. Heroku Toolbelt
#
# $ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
View rancher
#! /bin/bash
# Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3.
# Requirements:
#
# 1. Docker
#
# $ curl -fsSL https://get.docker.com/ | sh