FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get -y install vim
RUN apt-get -y install curl
ARG GIT_COMMIT=unknown
LABEL git-commit=$GIT_COMMIT
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
### | |
# run command: docker stack deploy -c docker-compose.yml dockercoins | |
### | |
version: "3" | |
services: | |
rng: | |
image: riggerthegeek/rng | |
ports: |
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 | |
# Retrieve public and private ip of instance | |
PUBLIC_HOSTNAME=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname) | |
PUBLIC_IP=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4) | |
PRIVATE_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) | |
# Generate openssl config for self-signed certificate with SANs | |
cat << EOF > ~/domain.cnf | |
[ ca ] |
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 | |
# Retrieve public and private ip of instance | |
PUBLIC_IP=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4) | |
PRIVATE_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) | |
mkdir ~/docker-ca | |
chmod 0700 ~/docker-ca | |
cd ~/docker-ca || exit 1 |
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
## Add to crontab -e with "/bin/bash /root/DropboxBackup.sh" | |
## Taken from http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/ | |
#!/bin/bash | |
DROPBOX_USER="Your Dropbox username" | |
DROPBOX_PASS="Your Dropbox password" | |
DROPBOX_DIR="Directory in your dropbox account to store the backups, e.g. /backups" | |
BACKUP_SRC="/home /var/www /var/git /etc /root" | |
BACKUP_DST="/tmp" | |
MYSQL_SERVER="127.0.0.1" |
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
/** | |
* Replace Env Vars | |
* | |
* Looks for a matching environment variable and | |
* puts it into the object | |
*/ | |
"use strict"; | |
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
######################################## | |
# Docker # | |
# # | |
# An Nginx container that enables the # | |
# application to run # | |
######################################## | |
# Run with | |
# docker build -t nginx/server . | |
# docker run -it --rm --name web -p 7777:9999 nginx/server |
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
import restify from "restify"; | |
const app = restify.createServer({ | |
name: 'MyApp', | |
}); | |
app.listen(8080); | |
export {app}; |
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
--- | |
title: Template | |
comments: true | |
tags: | |
- tag1 | |
- tag2 | |
--- | |
This is my template file |
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
// Get the kettle | |
var kettle = Kettle.getKettle(); | |
// Check we have enough water | |
while (kettle.cupsOfWater() < 1) { | |
// No - add water until there's enough | |
kettle.addWater(); | |
} | |
// Boil the kettle |