Skip to content

Instantly share code, notes, and snippets.

@sun1shayina
sun1shayina / broadcast_calc.sh
Created November 1, 2019 03:08 — forked from frntn/broadcast_calc.sh
Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation
#!/bin/bash
# Calculates network and broadcast based on supplied ip address and netmask
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0
# Usage: broadcast_calc.sh 192.168.0.1/24
tonum() {
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then
@sun1shayina
sun1shayina / gcloud_commands
Last active November 1, 2019 03:06 — forked from frntn/gcloud_commands
all gcloud commands
gcloud auth
gcloud auth activate-refresh-token
gcloud auth activate-service-account
gcloud auth git-helper
gcloud auth list
gcloud auth login
gcloud auth
gcloud auth print-access-token
gcloud auth print-refresh-token
gcloud auth revoke