Skip to content

Instantly share code, notes, and snippets.

View brennovich's full-sized avatar
👋
Hey, there

Brenno Costa brennovich

👋
Hey, there
View GitHub Profile

Keybase proof

I hereby claim:

  • I am brennovich on github.
  • I am brennovich (https://keybase.io/brennovich) on keybase.
  • I have a public key whose fingerprint is E6C7 B01C C850 A7D9 9EB0 969E 21DA 987A 821E 84FB

To claim this, I am signing this object:

@brennovich
brennovich / error_budget.md
Last active April 25, 2019 09:58
Key points of [Embrancing Risk chapter of Google's SRE book](https://landing.google.com/sre/sre-book/chapters/embracing-risk/)
@brennovich
brennovich / release_ips.sh
Created April 19, 2019 20:13 — forked from phspagiari/release_ips.sh
Release Calico unused IPs from CIDR Block (Bug v3.3.x)
#!/bin/bash
# Works for /16 CIDR Blocks, change / upgrade the script if you need
CIDR_PREFIX="172.20"
for oct1 in {128..255}; do
# Generate a new list of used IPs on every block
calicoctl get wep --all-namespaces | awk '{print $4}' |cut -d "/" -f1 > valid_ips.txt
for oct2 in {1..254}; do
if grep "${CIDR_BLOCK}.$oct1.$oct2" ./valid_ips.txt; then
  • Make sure you are aware of the problem/feature.
  • Don't be rude, be polite.
  • Give suggestions and make clear why do you think you suggestion is better than the current approach.
  • Don't point out just the bad things, tell about what do you think is great as well.
  • Make it part of your daily workflow. (use github notifications)
  • http://www.dein.fr/2015-02-18-maslows-pyramid-of-code-review.html

pyramid

#!/bin/bash
#
# Simple wrapper of Redis' SCAN command. It can control batch size, patterns and cursors.
if [ $# -ne 3 ]
then
echo "Find matching a pattern using SCAN "
echo "Usage: $0 <host> <port> <pattern>"
exit 1
fi
@brennovich
brennovich / analytics_api.rb
Created February 15, 2016 18:13
Almost external dependencies free GA API consuming
require 'date'
require 'json'
require 'net/http'
# non-stdlib dependencies
require 'signet/oauth_2/client'
# First we need to fetch our access token
pkc12_key = File.read('./legato-development-8b36edf27344.p12')
@brennovich
brennovich / README.markdown
Created February 12, 2016 00:44 — forked from terlar/README.markdown
ArchLinux on Mac Book Retina 13"
@brennovich
brennovich / 99-libinput.conf
Created December 29, 2015 03:04
/etc/X11/xorg.conf.d/99-libinput.conf
Section "InputClass"
Identifier "libinput"
Driver "libinput"
MatchDevicePath "/dev/input/event*"
EndSection
@brennovich
brennovich / 13status.conf
Last active December 18, 2015 04:02
My first i3wm config
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
output_format = "i3bar"
@brennovich
brennovich / selecta_command.vim
Last active November 29, 2016 14:44 — forked from drewdeponte/selecta_command.vim
An attempt at implementing support for selecta in neovim
function! SelectaCommand(choice_command, selecta_args, vim_command)
let dict = { 'buf': bufnr('%'), 'vim_command': a:vim_command, 'temps': { 'result': tempname() }, 'name': 'SelectaCommand' }
function! dict.on_exit(id, code)
bd!
if a:code != 0
return 1
endif