Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
const readline = require('readline');
const rl = readline.createInterface({input: process.stdin, output: process.stdout});
const prompt = (query) => new Promise((resolve) => rl.question(query, resolve));
//usage inside aync function do not need closure demo only*
(async () => {
try {
@woodcockjosh
woodcockjosh / .gitlab-ci.yaml
Last active July 21, 2020 12:49
CI+CD pipeline for k8s nodejs deployment with helm
stages:
- test
- docker-build
- version-push
- deploy
- cleanup
variables:
# The prefix to add to commit messages that only include upgrades of versions
# Due to the limitations of the workflow expressions. You must also update the workflow rules below if you change this
#!/usr/bin/env bash
set -e
# Colors
red='\033[0;31m'
no_color='\033[0m'
# Inputs
gitlab_host=$1
!/usr/bin/env bash
hdiutil attach /Applications/Install\ macOS\ Mojave\.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/mojave
hdiutil create -o ./MojaveBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach ./MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ Mojave\.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm -rf /Volumes/OS\ X\ Base\ System/System/Installation/Packages
sudo mkdir -p /Volumes/OS\ X\ Base\ System/System/Installation/Packages
sudo cp -R /Volumes/mojave/Packages/* /Volumes/OS\ X\ Base\ System/System/Installation/Packages/
hdiutil detach /Volumes/macOS\ Base\ System
hdiutil detach /Volumes/mojave/
# 1. Open Shell window 1
namespace="annoying-namespace-to-delete"
# 2. Dump the namespace into a data file
kubectl get namespace ${namespace} -o json > tmp.json
# 3. Edit the namespace manually and make all the finalizers an empty array
# 4. Start kubectl proxy so we can use curl commands instead of kubectl (which doesn't work)
kubectl proxy --port=8787