Skip to content

Instantly share code, notes, and snippets.

View just1689's full-sized avatar
☁️
In the cloud

Justin Tamblyn just1689

☁️
In the cloud
  • South Africa
View GitHub Profile
@just1689
just1689 / k8s.sh
Last active November 20, 2019 17:57
K8s tricks
source <(kubectl completion zsh)
source <(kubectl completion bash)
kubectl config get-contexts
kubectl config use-context

Scraping Discussion

Structure / design

  • One day code vs a couple days code vs production code
  • Break into stages
  • Save output from each stage
  • Run next stage off output from previous stage

Random

  • Parallelism
@just1689
just1689 / k8s-setup.md
Last active November 25, 2019 08:23
K8s Setup

On every vm

sudo su
passwd
# some root password
nano /etc/ssh/sshd_config
# Append line
@just1689
just1689 / example.ps1
Created November 12, 2019 11:40
Powershell to see if Ubuntu subsystem Linux is installed
$p = Get-AppxPackage -N "CanonicalGroupLimited.Ubuntu18.04onWindows"
$ok = $p."Status" -eq "ok"
if ($ok) {
Write-host "Installed"
}
@just1689
just1689 / ansible-docker-network.yml
Created September 27, 2019 11:51 — forked from clems4ever/ansible-docker-network.yml
Deploy a docker service using Ansible within Docker Swarm 1.12
---
- name: Check if network {{ name }} exists
delegate_to: "{{ groups['docker_swarm_issuer'][0] }}"
run_once: true
command: docker network ls -q --filter name=^{{ name }}$
register: network_exists
changed_when: false
- name: Create network {{ name }}
command: docker network create --driver {{ driver }} {{ name }}
package main
import (
"net/http"
"os"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w,r, r.URL.RequestURI()[1:])
@just1689
just1689 / oracle-12c-setup.sql
Created August 27, 2019 17:14
Initial setup for Oracle 12c
CREATE USER just1689
IDENTIFIED BY penguins;
CREATE USER COR
IDENTIFIED BY penguins;
GRANT create session TO just1689;
GRANT create table TO just1689;
GRANT create view TO just1689;
@just1689
just1689 / awesome-git.md
Created August 21, 2019 09:58
Pretty git in terminal

git log --oneline --graph --decorate --all

@just1689
just1689 / docker-compose.yml
Last active June 12, 2019 07:13
NSQ docker services stack
version: '3'
services:
nsqlookupd:
image: nsqio/nsq
networks:
- my-services
command: /nsqlookupd
ports:
- "4160"
- "4161"
@just1689
just1689 / setup.sh
Last active May 24, 2019 11:15
Getting around Corporate firewall Kubernetes setup
# On your laptop - connected to the Internet
## Start the registry
docker run -d -p 5000:5000 --name registry registry:2
## Pull Kubernetes Images