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
@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
@brennovich
brennovich / README.markdown
Created February 12, 2016 00:44 — forked from terlar/README.markdown
ArchLinux on Mac Book Retina 13"
@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