Skip to content

Instantly share code, notes, and snippets.

View mikejk8s's full-sized avatar
🦀

Mike Johnson mikejk8s

🦀
View GitHub Profile
@mikejk8s
mikejk8s / google-snapshot
Created November 2, 2017 16:34
Google Compute Snapshotter
#!/bin/bash
# loop through all disks within this project and create a snapshot
gcloud compute disks list --format='value(name,zone)'| while read DISK_NAME ZONE; do
gcloud compute disks snapshot $DISK_NAME --snapshot-names gcs-$DISK_NAME-$(date "+%Y-%m-%d-%s") --zone $ZONE
done
#
@mikejk8s
mikejk8s / google-snapshot-delete
Created November 2, 2017 16:34
Google Snapshot Delete
#!/bin/bash
# snapshots are incremental and dont need to be deleted, deleting snapshots will merge snapshots, so deleting doesn't loose anything
# having too many snapshots is unwiedly so this script deletes them after 60 days
#
gcloud compute snapshots list --filter="creationTimestamp<$(date -d "-2 days" "+%Y-%m-%d")" --regexp "(gcs.*)" --uri | while read SNAPSHOT_URI; do
gcloud compute snapshots delete $SNAPSHOT_URI --quiet
done
#
@mikejk8s
mikejk8s / remove-fluentd.yaml
Last active November 6, 2020 11:52
Remove fluentd GKE
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: startup-script
labels:
app: startup-script
spec:
template:
metadata:
labels:
@mikejk8s
mikejk8s / fluentd.yaml
Created November 13, 2017 21:41
Trying to resize GKE fluentd..
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd-gcp-mj
namespace: kube-system
labels:
k8s-app: fluentd-gcp-mj
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: EnsureExists
version: v2.0
@mikejk8s
mikejk8s / nginx-rbac-prod-use.yaml
Last active January 26, 2018 23:10
0.10.0 nginx-ingress full RBAC
apiVersion: v1
kind: Service
metadata:
labels:
name: "{{.Values.websocket_ingress_name}}"
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: "{{.Values.websocket_ingress_name}}"
@mikejk8s
mikejk8s / config.plist
Created February 17, 2018 18:57
MSi Gaming z170a m5 hackintosh
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>DSDT</key>
<dict>
<key>Fixes</key>
<dict>
@mikejk8s
mikejk8s / keybase.md
Created February 17, 2021 16:48
keybase.md

Keybase proof

I hereby claim:

  • I am mikejk8s on github.
  • I am mike_johnson (https://keybase.io/mike_johnson) on keybase.
  • I have a public key ASDniYq4wCLu4vpxbwBQV6_Uxzgow3tJ2H6LSuNlVygwIwo

To claim this, I am signing this object:

new-module-test

This project was generated by generator-tf-module

Overview

This is a new module

Usage

Keybase proof

I hereby claim:

  • I am mikejk8s on github.
  • I am swozey (https://keybase.io/swozey) on keybase.
  • I have a public key ASDzRNvP2Qholh7SahhE83bGga_MKR2yYs6q74umlEuKWwo

To claim this, I am signing this object:

@mikejk8s
mikejk8s / rust-command-line-utilities.markdown
Created February 3, 2023 17:06 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
  • bat: A replacement for cat that provides syntax highlighting and other features.
  • bottom: Yet another cross-platform graphical process/system monitor.