Skip to content

Instantly share code, notes, and snippets.

View csark's full-sized avatar

csark

  • United States
View GitHub Profile
@csark
csark / geoip.sh
Last active December 22, 2020 22:07
Bash script for geoip lookups
#!/bin/bash
IP=$1
OUTPUT=$(curl -s -X POST -d "ipAddress=${IP}" https://www.ultratools.com/tools/geoIpResult | grep -E 'class="(label|value)"' | awk -F "[><]" '{print $3}' | sed 's/&nbsp;//g')
SAVEIFS=$IFS # Save current Internal Field Separator
IFS=$'\n' # Change IFS to new line character
geoip=($OUTPUT) # split to array $names
IFS=$SAVEIFS # Restore IFS
@csark
csark / keybase.md
Created October 18, 2017 17:40
Keybase proof

Keybase proof

I hereby claim:

  • I am csark on github.
  • I am csark (https://keybase.io/csark) on keybase.
  • I have a public key whose fingerprint is 8A77 DAB3 1E5B A555 3F8B AB35 14D9 3145 F770 8EEC

To claim this, I am signing this object: