Jul 29 2009

mysql bizarre self union

Category: Uncategorizedben @ 9:31 am

i wanted to use this:

(select * from Seasons where id=5) union
(select * from Seasons where id<>5 order by id desc);

but i had to use this:

SELECT * FROM
(SELECT * FROM Seasons
WHERE id=5
ORDER BY id DESC) AS t1

UNION

SELECT * FROM
(SELECT * FROM Seasons
WHERE id<>5
ORDER BY id desc) AS t2


Jul 17 2009

klogd it

Category: documentation, inspiration & quotes, moods, quick hacksben @ 2:34 pm

step one: ln -s /dev/null /thetoilet

step two: klogd > /thetoilet  2>&1

this is how you can clog the toilet with 2s and 1s


Jul 15 2009

good fortune (no dash oh)

Category: inspiration & quotes, moodsben @ 2:58 pm

a server told me this joke today:
He:     Do you like Kipling?
She:    Oh, you naughty boy, I don’t know!  I’ve never kippled!


Jul 14 2009

djb quotes

Category: helpful links, inspiration & quotes, moods, rantsben @ 11:19 pm

somehow made my way here after fighting with his three versions of documentation for the same AMAZING product

incredibly amusing: http://en.wikiquote.org/wiki/Daniel_J._Bernstein

incredibly surprising: http://blogs.zdnet.com/security/?p=2812


Jul 14 2009

remove files and folders by date

Category: documentation, quick hacks, scriptsben @ 8:00 pm

this is designed to delete files by date from the current directory….it was googles fault for providing “source” in a .deb with relative paths without being clear. plus it was my fault for not doing a test extract prior to doing a real one….pretty irrelevant but was needed to tidy up my /usr/local/src

by design will remove files dated 2008-11-07 from slackware’s ls -al …probably would be wise to trial run it by changing the xargs to an echo first ;-)

#ls -altrh |grep ‘2008-11-07′ |awk {’print $8′} |xargs rm -rfv


Jul 02 2009

qmail with ezmlm on openbsd

Category: documentation, helpful linksben @ 9:08 am

i wouldn’t suggest that anyone mimick mymethod here because i’m putting all of this into an openbsd virtual machine already configured with postfix, dovecot and a handful of other software (check out allardsoft for more info) but i’ll be putting up more info as i’m repeating my process and finding missing info

comp45.tgz –> compilation base set –> ftp://ftp.openbsd.org/pub/OpenBSD/4.5/i386/comp45.tgz

cd /
tar zxpf /path/to/file/comp45.tgz

daemontools daemontools-0.76.tar.gz daemontools home
ucspi-tcp ucspi-tcp-0.88.tar.gz ucspi-tcp home
qmail qmail-1.03.tar.gz qmail home


Jul 02 2009

openbsd basic info to remember

Category: documentationben @ 9:00 am

this will be expanded as my knowledge grows but for now i just need to be able to find this info again.

a package is a piece of software

a set is a series of software packages that speak together

to install a set after the initial install, simplly untar the *.tgz from the root directory while preserving permissions

# cd root

# tar zxvpf /path/to/set.tgz