sudo scutil --set HostName <override host name>
SASB
A stopped clock is right twice a day, and a ticket queue is empty twice in a geek’s tenure.
1 year ago
Sadness in the contemporary world. (artist unknown)
1 year agoOpenvz pretty printing disk usage
Second verse almost the same as the first.
/usr/sbin/vzlist -o ctid,hostname,diskspace,diskspace.s | \
awk 'BEGIN { totalused=0; totalquota=0; } \
$1 ~ /CTID/ { printf "%5s %20s %6s %6s\n", $1, $2, "used", "quota"; next; } \
$1 ~ /[0-9]+/ { totalused += $3; totalquota += $4; split($2, arr, /\./); \
printf "%5s %20s %6.2f %6.2f\n", $1, arr[1], $3 / 1024 / 1024, $4 / 1024 / 1024; } \
END { printf "total %20s %6.2f %6.2f\n", "", totalused / 1024 / 1024, totalquota / 1024 / 1024; }'
Pretty printing openvz memory allocation
awk: when you can’t be bothered to write a proper while loop.
/usr/sbin/vzlist -o ctid,hostname,privvmpages.b | \
awk 'BEGIN { total=0; } $1 ~ /CTID/ { printf "%5s %20s %5s\n", $1, $2, "mem"; next; } \
$1 ~ /[0-9]+/ { total += $3; \
split($2, arr, /\./); printf "%5s %20s %5.2f\n", $1, arr[1], $3 * 4 / 1024 / 1024; } \
END { printf "total %20s %5.2f\n", "", total * 4 / 1024 / 1024; }'
eject: Here’s the part where I tease you about Snow in America
I moved away from the snow so I wouldn’t have to feel like a pansy while making excuses.
1 year agoThey put up one of my airship photos.
2 years ago
Square Wave, also by Steve Hanov. Fanboyish to post two links back-to-back but this one hit a little too close to home for me.
2 years ago
How a programmer reads your resume by Steve Hanov. Seems like this would work pretty well. By way of Jeremy Zawodny.
2 years ago