Skip to content

Instantly share code, notes, and snippets.

@tgautier
tgautier / kubedf
Created January 10, 2020 18:01 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
KUBEAPI=127.0.0.1:8001/api/v1/nodes
function getNodes() {
curl -s $KUBEAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
### Keybase proof
I hereby claim:
* I am tgautier on github.
* I am tgautier (https://keybase.io/tgautier) on keybase.
* I have a public key whose fingerprint is 6AB7 E4B8 1F12 84D0 E827 D14A D191 C915 D3C2 35FD
To claim this, I am signing this object:
@tgautier
tgautier / just_an_elixir_fizzbuzz.ex
Created July 19, 2017 09:09
Just an Elixir FizzBuzz
defmodule FizzBuzz do
def fizzbuzz(n) do
Enum.map 1..n, &fizzify(&1)
end
def fizzify(i) do
case {rem(i, 3), rem(i, 5), i} do
{0, 0, _} -> "FizzBuzz"
{0, _, _} -> "Fizz"
{_, 0, _} -> "Buzz"
#!/bin/bash
VLC_BIN="/Applications/VLC.app/Contents/MacOS/VLC"
CHANNEL="/di_vocaltrance_aacplus"
if [ "$1" ]; then
CHANNEL="$1"
fi
if [ "$2" ]; then
VLC_BIN=`which $2`
shift
shift
@tgautier
tgautier / keybase.md
Last active August 1, 2016 09:54
keybase.md

Keybase proof

I hereby claim:

  • I am tgautier on github.
  • I am tgautier (https://keybase.io/tgautier) on keybase.
  • I have a public key ASBJz5lEfCKqYpAn4jU97j_WkUQkB8Y7MN3zdRwEmFtMKQo

To claim this, I am signing this object:

types:
addition: "93c95c"
environment: "fad9c9"
experience: "ffc27a"
feedback: "cc317c"
improvement: "63c0fd"
inactive: "d3dbe2"
mindless: "fef2c0"
pending: "fbc92f"
platform: "c1d5f1"
==> Downloading https://go.googlecode.com/files/go1.1.2.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/go-1.1.2.tar.gz
tar xf /Library/Caches/Homebrew/go-1.1.2.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file src/cmd/ld/lib.c
Hunk #1 succeeded at 665 with fuzz 2.
==> ./make.bash --no-clean
# Building C bootstrap tool.
cmd/dist
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/cov
# With thanks to https://github.com/optoro/activerecord-callback_notification for original inspiration
if Rails.env.development?
module ActiveRecord
module CallbackNotifications
extend ActiveSupport::Concern
module ClassMethods
def notify_all_callbacks
# Make sure all models are loaded before trying to enumerate
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH