Skip to content

Instantly share code, notes, and snippets.

View aaronky's full-sized avatar
💭
I may be slow to respond.

Aaron Kaufman aaronky

💭
I may be slow to respond.
View GitHub Profile
moosemaster# diskinfo -t /dev/stripe/moose
/dev/stripe/moose
512 # sectorsize
11999870058496 # mediasize in bytes (11T)
23437246208 # mediasize in sectors
65536 # stripesize
0 # stripeoffset
Seek times:
Full stroke: 250 iter in 2.205430 sec = 8.822 msec
@aaronky
aaronky / gist:948687
Created April 29, 2011 17:45 — forked from dctrwatson/gist:948644
MySQL HAProxy replication check using mk-heartbeat
We couldn’t find that file to show.
CREATE TABLE heartbeat (
id int NOT NULL PRIMARY KEY,
ts datetime NOT NULL
);
INSERT INTO heartbeat (id) VALUES (1);
sudo pfctl -t bruteforce -T show
41.89.160.5
46.38.161.16
46.45.147.25
46.45.147.201
46.166.131.242
46.166.136.51
60.191.241.102
61.135.171.164
#!/usr/local/bin/bash
# AUTHOR: aaron@fisix.net
# FILE: /usr/home/aaron/lulz/locate_kids.bash
# CREATED: 15:50:28 01/06/2011
# MODIFIED: 15:55:05 01/06/2011
# yeah loops are kewl. geoiplookup on pf bruteforce table.
# note add 'pfctl -t bruteforce -T show' to sudoers w/o passwd.
for IP in `sudo pfctl -t bruteforce -T show`;
Looking up portsnap.FreeBSD.org mirrors... 5 mirrors found.
Fetching snapshot tag from portsnap5.FreeBSD.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Tue Jun 7 00:13:32 UTC 2011:
fetch: http://portsnap5.FreeBSD.org/s/39b35d65c9b7c108dd3971308de457fe63db56bb194481e332cf464f1aa0c495.tgz: Requested Range Not Satisfiable
41.89.160.5 GeoIP Country Edition: KE, Kenya
46.38.161.16 GeoIP Country Edition: GB, United Kingdom
46.45.147.25 GeoIP Country Edition: TR, Turkey
46.45.147.201 GeoIP Country Edition: TR, Turkey
46.166.131.242 GeoIP Country Edition: LU, Luxembourg
46.166.136.51 GeoIP Country Edition: LU, Luxembourg
60.191.241.102 GeoIP Country Edition: CN, China
61.135.171.164 GeoIP Country Edition: CN, China
61.148.75.130 GeoIP Country Edition: CN, China
61.236.64.231 GeoIP Country Edition: CN, China
# diskinfo -t /dev/ad4s1f
/dev/ad4s1f
512 # sectorsize
25015509504 # mediasize in bytes (23G)
48858417 # mediasize in sectors
0 # stripesize
2120252928 # stripeoffset
48470 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
===> Building for tmux-1.4_5
cc -iquote. -O2 -pipe -fno-strict-aliasing -march=nocona -DBUILD="\"1.4\"" -c attributes.c -o attributes.o
In file included from attributes.c:23:
tmux.h:30:19: error: event.h: No such file or directory
In file included from attributes.c:23:
tmux.h:830: error: field 'name_timer' has incomplete type
tmux.h:1032: error: field 'key_timer' has incomplete type
tmux.h:1093: error: field 'event' has incomplete type
tmux.h:1117: error: field 'repeat_timer' has incomplete type
tmux.h:1139: error: field 'identify_timer' has incomplete type
tar -zcf - /home/aaron/irclogs| openssl enc -aes-256-cbc -salt -out /mnt/nas/irclogs.tgz.as-256-cbc