This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
OlderNewer