Skip to content

Instantly share code, notes, and snippets.

View DanielChuDC's full-sized avatar
🎯
Focusing

danielchu DanielChuDC

🎯
Focusing
  • singapore
View GitHub Profile
@DanielChuDC
DanielChuDC / database.rules.json
Created October 15, 2019 08:43 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@DanielChuDC
DanielChuDC / inventory.ini
Created November 20, 2019 04:39 — forked from davivcgarcia/inventory.ini
Red Hat OpenShift v3.11 - Inventory Example: Authenticated Registry + Glusterfs (Logging, Metrics, Registry, Apps)
[OSEv3:children]
masters
nodes
etcd
glusterfs
[OSEv3:vars]
ansible_ssh_user=ec2-user
ansible_become=true
@DanielChuDC
DanielChuDC / upgrade-ocp-cluster.sh
Created December 6, 2019 09:42 — forked from rohitkrai03/upgrade-ocp-cluster.sh
Upgrade Openshift Cluster from 4.1 to 4.2
oc adm upgrade --to-image=registry.svc.ci.openshift.org/origin/release:4.2 --force
@DanielChuDC
DanielChuDC / dnsmasq.md
Created December 6, 2019 09:43 — forked from jlebon/dnsmasq.md
How to set up dnsmasq on an OpenShift cluster

This gist is mostly based on the dnsmasq appendix from the openshift-training repo. However, I updated it and included fixes for the many gotchas I found along the way.

This is useful for folks who want to set up a DNS service as part of the cluster itself, either because they cannot easily change their DNS setup outside of the cluster, or just because they want to keep the cluster setup self-contained.

@DanielChuDC
DanielChuDC / GIF-Screencast-OSX.md
Created January 1, 2020 15:06 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@DanielChuDC
DanielChuDC / delete-evicted-pods-all-namespaces.sh
Created February 4, 2020 23:32 — forked from svx/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@DanielChuDC
DanielChuDC / iterm2-solarized.md
Created February 16, 2020 12:31 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@DanielChuDC
DanielChuDC / check-qemu-binfmt.sh
Created March 13, 2020 11:16 — forked from ArturKlauser/check-qemu-binfmt.sh
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script checks if all software requirements are met in a Linux environment
# in order to use 'docker buildx' to build multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
function error() {
echo "ERROR: $*"
@DanielChuDC
DanielChuDC / reregister-qemu-binfmt.sh
Created March 13, 2020 11:18 — forked from ArturKlauser/reregister-qemu-binfmt.sh
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script tries to reregister QEMU's binfmt_misc handlers with the
# fix-binary (F) flag in order to be usable with 'docker buildx' to build
# multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
function remove_binfmt() {
@DanielChuDC
DanielChuDC / update-golang.md
Created March 20, 2020 02:40 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by: