Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
View GitHub Profile
View Procfile
web: ./bin/rackup -p "$PORT"
View Gemfile
gem "google-id-token"
@drnic
drnic / AlignmentWidget.vue
Last active Jul 6, 2020
Vue component for some alignment buttons. Demo at https://share.getcloudapp.com/2Nu5bL1B
View AlignmentWidget.vue
<template>
<span class="p-1 inline-flex items-center rounded-lg bg-gray-200">
<button
@click="alignmentSelected = 'left'"
:class="alignmentSelected == 'left' ? 'bg-white shadow' : 'hover:bg-gray-400'"
class="p-1 rounded-lg"
>
<svg class="h-6 w-6 text-gray-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 333 333">
<path
stroke="currentColor"
View aaa.md
git clone https://gist.github.com/drnic/a042bd719ed9213c5af7fd1605f8bf93 ~/workspace/pipeline.bk-run-docker-fail
cd ~/workspace/pipeline.bk-run-docker-fail

bk run pipeline.bk-run-docker-fail.yml -E AGENT_ENV=where-is-this-env

The output should include the two lines:

@drnic
drnic / Procfile
Last active Feb 9, 2020
Deploy https://jupyter.org/ Jupyter Lab to Cloud Foundry
View Procfile
web: jupyter lab --ip 0.0.0.0 --port $PORT --no-browser
View staff.json
{
"drnic": {"joined": 2012},
"bob": {"joined": 2020}
}
View README.md
$ kaf generate-secret.yaml
$ k get secret my-internal-secret -n kubecf -ojsonpath='{.data.password}' | base64 --decode
CDVIqCF7LY6dLyEGq10BrzaZfRWGDl8dxSV4vuVz8eDGga8AoP84SEc22Ben25mM

Now rotate secret:

$ kaf rotate-my-internal-secret.yaml
View all-the-pi-at-right-temp.md
stern -n kube-system -l k8s-app=pi-temperature -s 10m

example

View k3sup-gce.sh
#!/bin/bash
set -u
up() {
INSTANCE_TYPE=${INSTANCE_TYPE:-n1-standard-1}
(
set -x
gcloud compute instances create k3s-1 \