Skip to content

Instantly share code, notes, and snippets.

View nicosingh's full-sized avatar

Nico Singh nicosingh

View GitHub Profile
#!/bin/bash
# clean not running containers
LIST_STATUS="created restarting removing paused exited dead"
for status_element in $LIST_STATUS
do
for container in $(/usr/bin/docker ps -aq -f status=$status_element)
do
echo "`date '+[%Y-%m-%d %H:%M:%S]'` gracefully eliminating container ${container}"
/usr/bin/docker rm $container
version: "3"
services:
tor-router:
container_name: tor-router
image: jess/tor-router:latest
network_mode: host
onion:
image: jess/onion:latest
@nicosingh
nicosingh / lipsum_chile.txt
Created December 5, 2017 18:27
Lorem Ipsum Chileno
Lorem ipsum dolor sit cuchuflí barquillo bacán jote gamba listeilor po cahuín, luca melón con vino pichanga coscacho ni ahí peinar la muñeca chuchada al chancho achoclonar. Chorrocientos pituto ubicatex huevo duro bolsero cachureo el hoyo del queque en cana huevón el año del loly hacerla corta impeque de miedo quilterry la raja longi ñecla. Hilo curado rayuela carrete quina guagua lorea piola ni ahí.
@nicosingh
nicosingh / README.md
Last active December 7, 2017 16:38
Virtualbox inside a vagrant box

Virtualbox inside a vagrant box

Requirements:

  • Virtualbox
  • Vagrant

How to use:

  1. Download this Gist as a zipfile
  2. Run vagrant up to create and provision a new box
@nicosingh
nicosingh / README.md
Last active December 7, 2017 16:35
Docker inside a vagrant box

Docker inside a vagrant box

Requirements:

  • Virtualbox
  • Vagrant

How to use:

  1. Download this Gist as a zipfile
  2. Run vagrant up to create and provision a new box
# update system
sudo apt-get update
sudo apt-get upgrade -y
# install software
sudo apt-get install hostapd dnsmasq bridge-utils openvpn unzip -y
sudo systemctl stop hostapd
sudo systemctl stop dnsmasq
sudo rm -f /etc/dhcpcd.conf
@nicosingh
nicosingh / docker-compose.yml
Created May 23, 2018 20:37
jenkins + artifactory in Docker
# make sure volumes exist before starting this
# mkdir -p {jenkins/volumes/var/jenkins_home,artifactory}
jenkins:
image: jenkins/jenkins:2.84
restart: always
ports:
- "80:8080"
- "50000:50000"
volumes:
- ./jenkins/volumes/var/jenkins_home:/var/jenkins_home
@nicosingh
nicosingh / _index.md
Last active June 28, 2018 11:57
serverless.com Flask app

Create a Flask Serverless Python App

Initialise a new app

$ [~] sls create --template aws-python --path my-cool-app
$ [~] cd my-cool-app

Install sls plugins

@nicosingh
nicosingh / docker-compose.yml
Created July 5, 2018 20:43
Docker Registry with HTTPS
registry:
image: registry:2.6.1
restart: always
ports:
- "5000:5000"
environment:
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/live/domain.address.com/fullchain.pem
REGISTRY_HTTP_TLS_KEY: /certs/live/domain.address.com/privkey.pem
REGISTRY_STORAGE_DELETE_ENABLED: "true"
volumes:
@nicosingh
nicosingh / .gitignore
Last active August 8, 2018 15:00
K8S cluster using Vagrant
.vagrant/
tmp/