Skip to content

Instantly share code, notes, and snippets.

View stebaps's full-sized avatar

Steve Thornton stebaps

  • Dublin, Ireland
View GitHub Profile
@stebaps
stebaps / k3d-install-dashboard.md
Created April 15, 2022 21:08 — forked from smijar/k3d-install-dashboard.md
k3d-install-dashboard

ref

https://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/

install

Deploying the Kubernetes Dashboard

GITHUB_URL=https://github.com/kubernetes/dashboard/releases
VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
@stebaps
stebaps / progress-console-output-ruby.rb
Created November 15, 2018 13:14
Example progress indicator in console
percentage_complete = ((index.to_f / SOME_TOTAL) * 100).floor
if (percentage_complete % 5).zero?
unless percentage_complete < 5
progress = "=" * (percentage_complete / 5)
end
printf("\rProgress: [%-20s] %d%%", progress, percentage_complete)
sleep(0.01)
end
#!/bin/sh
# This has to be run from develop
git checkout develop
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@stebaps
stebaps / Get font names
Last active October 23, 2016 14:04
Get the font names for all fonts available to the system.
for family in UIFont.familyNames() {
println("\(family)")
for name in UIFont.fontNamesForFamilyName(family as! String) {
println(" \(name)")
}
}
// Swift 3.0
for family in UIFont.familyNames {
print("\(family)")