Skip to content

Instantly share code, notes, and snippets.

View paulhomes's full-sized avatar

Paul Homes paulhomes

View GitHub Profile
@paulhomes
paulhomes / geoiplookup
Created January 28, 2023 23:48
A geoiplookup replacement that uses mmdblookup.
#!/bin/sh
ip=$1
if [ -z "$ip" ]; then
echo "ERROR: ip not specified"
echo "e.g. geoiplookup 1.1.1.1"
exit 1
fi
db=/usr/share/GeoIP/GeoIP2-Country.mmdb
code=`mmdblookup -f $db -i $ip country iso_code | tr -d '\n' | awk -F '"' '{print $2}'`
country=`mmdblookup -f $db -i $ip country names en | tr -d '\n' | awk -F '"' '{print $2}'`
@paulhomes
paulhomes / proc-iomoperate-with-clients.sas
Created January 11, 2023 04:53
A variation on the SAS PROC IOMOPERATE sample by Chris Hemedinger at https://blogs.sas.com/content/sasdummy/2016/02/15/using-proc-iomoperate/ to add an ALLCLIENTS table.
* Adapted from the SAS PROC IOMOPERATE sample by Chris Hemedinger
at https://blogs.sas.com/content/sasdummy/2016/02/15/using-proc-iomoperate/
to add an ALLCLIENTS table
;
%let connection='iom://mysasserver.example.com:8581;bridge;user=sasadm@saspw,pass=secretpassword';
* Get a list of processes;
proc iomoperate uri=&connection;
list spawned out=spawned;

Keybase proof

I hereby claim:

  • I am paulhomes on github.
  • I am paulhomes (https://keybase.io/paulhomes) on keybase.
  • I have a public key whose fingerprint is 8651 5670 9CA8 4EAD 2C9D 36AE 740F 1FF6 D2F7 1FCA

To claim this, I am signing this object:

@paulhomes
paulhomes / sasmc.ini
Created August 16, 2017 03:25
SAS Management Console config (sasmc.ini) fragment to use Metal Look & Feel on Linux
...
JavaArgs_16=-Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel
...