Skip to content

Instantly share code, notes, and snippets.

View mbadley's full-sized avatar

Malcolm Badley mbadley

  • Private
View GitHub Profile
@mbadley
mbadley / docker-cheat-sheet.txt
Created August 28, 2017 10:54
Docker Cheat Sheet
docker login registry.XXXX.com with new container
docker pull registry.XXXX..com/nativ/base-microservice:latest
#ID of the last-run Container
docker ps -l -q (aliased to dl)
#list images
docker images
#list all containers
docker ps -a
#create a container but do not run it
docker create
@mbadley
mbadley / puppet getting started
Created August 25, 2017 13:51
puppet getting started master, client & a module
#puppet master
apt-get update && sudo apt-get -y install ntp
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
dpkg -i puppetlabs-release-pc1-xenial.deb
apt update
apt upgrade
apt install puppetmaster-passenger
systemctl stop apache2
puppet resource package puppetmaster ensure=latest
#/etc/puppet/puppet.conf
@mbadley
mbadley / ssh-tunnel
Last active August 25, 2017 09:01
ssh tunnel
#/bin/bash
# examples of ssh tunnels
# example 1
# ssh -f user@personal-server.com -L 2000:personal-server.com:25 -N
# The -f tells ssh to go into the background just before it executes the command.
# This is followed by the username and server you are logging into.
# The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port.
# Finally the -N instructs OpenSSH to not execute a command on the remote system.
# This forwards the local port 2000 to port 25 on personal-server.com over with the benefit of being encrypted.
# I then point my E-mail client to use localhost:2000 as the SMTP.