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
types:
addition: "93c95c"
environment: "fad9c9"
experience: "ffc27a"
feedback: "cc317c"
improvement: "63c0fd"
inactive: "d3dbe2"
mindless: "fef2c0"
pending: "fbc92f"
platform: "c1d5f1"
@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:

@tgautier
tgautier / file.json
Created October 24, 2014 09:25
[Le Wagon] JSON & Arrays
{
"name": "Paris",
"population": 2211000
}
def greet(arg1, arg2, name)
puts "#{arg1} ---- #{arg2} #{yield(name)}"
end
me = 'John'
greet(1, 2, me) { |name| "Hello #{name}" }
greet(1, 2, me) { |name| "Bonjour #{name}" }
@tgautier
tgautier / block_faker.rb
Created October 23, 2014 08:36
Faker method to illustrate blocks @lewagon
def fake_complexity(number)
puts "Launching very smart computation with the most clever algorithm...."
sleep(1)
puts ".."
sleep(1)
puts "...."
sleep(1)
puts "......."
result = yield(number, 4)
# 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