Skip to content

Instantly share code, notes, and snippets.

@BenHall
BenHall / hello-world.md
Last active November 8, 2021 06:18
GitHub Profile Gist
@BenHall
BenHall / postgres.service
Last active September 21, 2021 19:34
Docker Systemd Unit File
[Unit]
Description=PostgreSQL container
Requires=docker.service
After=docker.service
[Service]
Restart=on-failure
RestartSec=10
ExecStartPre=-/usr/bin/docker stop postgres
ExecStartPre=-/usr/bin/docker rm postgres
apiVersion: apps/v1
kind: Deployment
metadata:
name: example
spec:
selector:
matchLabels:
app: example
replicas: 1
template:
@BenHall
BenHall / bootstrap.jade
Created November 22, 2011 18:36
Twitter Bootstrap in Jade
script(src='/javascripts/jquery-1.7.min.js')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/bootstrap-overrides.css')

TLDR: RSVP at https://www.meetup.com/Docker-London/events/234774339/, make sure you have a Docker Hub account, and bring your laptop fully charged with Docker set-up. See below for some further instructions and details.

Create a Docker Hub account here at https://hub.docker.com. You will need a Docker Hub account to access the course materials.

Set-up Docker on your laptop (you will need to bring your computer): Linux users: we need you to install Docker Engine and Docker compose. Make sure you have Docker compose version 1.6 or higher by running docker-compose version from the command prompt. Mac users: install Docker for Mac or if you have an older Mac, Docker Toolbox.

Windows users: if you have Windows 10 pro install Docker for Windows, otherwise install Docker Toolbox. If you want to try the new Windows containers, go through the setup steps in the Windows Container lab. It is essential to run this command in Powershell before coming to the event:

@BenHall
BenHall / bash.js
Created January 19, 2016 15:10
Katacoda Embedded Example
<script src="//katacoda.com/embed.js"></script>
<div id="inline-terminal-1" data-katacoda-env="bash" style="height: 500px;"></div>
Param(
[parameter(Mandatory = $true)] $ManagementIP,
[ValidateSet("l2bridge", "overlay",IgnoreCase = $true)] [parameter(Mandatory = $false)] $NetworkMode="l2bridge",
[parameter(Mandatory = $false)] $ClusterCIDR="10.244.0.0/16",
[parameter(Mandatory = $false)] $KubeDnsServiceIP="10.96.0.10",
[parameter(Mandatory = $false)] $ServiceCIDR="10.96.0.0/12",
[parameter(Mandatory = $false)] $InterfaceName="Ethernet",
[parameter(Mandatory = $false)] $LogDir = "C:\k",
[parameter(Mandatory = $false)] $KubeletFeatureGates = ""
)
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+r",
"command": "workbench.action.replaceInFiles"
},
{
"key": "shift+cmd+h",
"command": "-workbench.action.replaceInFiles"
},
require 'socket'
socket = TCPSocket.new('localhost', 7894)
socket.puts "'B'*50024"
all_data = []
while partial_data = socket.read(2024)
puts partial_data
puts "-------------------------"
all_data << partial_data
@BenHall
BenHall / readme.md
Last active December 1, 2017 21:52
Example Readme.md

Title

Goals

Install

Usage