2005/04/13
cat nerdblog >> blog
Decided to merge the nerdblog with my regular blog. No need to seperate my nerdiness from my regular-ness. If anyone knows how to merge blogs with blogger, let me know.
2005/02/21
Killing Referer Spam
Apparently spammers have taken to hitting up web servers and flooding them with REFERER spam. Stuff like this:
219.235.236.225 - - [07/Feb/2005:14:34:23 -0800] "GET /pictures/index.cgi?mode=album&album=/cars/misc/rally HTTP/1.1"
200 11108 "http://texas-holdem.crescentarian.net/"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iRider 2.21.1108; FDM)"
Notice the texas-holdem stuff. So that appears in my log analysis software, flooding it with this junk. I figure it's either bots that do this on purpose or people who have downloaded spyware/adware. Either way, it's annoying. This is my solution:
SetEnvIfNoCase Referer "(holdem|hole-em|casino|viagra|chatt-nett|diet-pills|poker|mortgage|roulette|valium|phentermine|loans)" referer_spam
order deny,allow
deny from env=referer_spam
CustomLog /home/nathan/logs/www.mybrainhurts.com-access.log combined env=!referer_spam
CustomLog /home/nathan/logs/www.mybrainhurts.com-spam.log combined env=referer_spam
So, the first line sets an environment variable "referer_spam" if it encounters any of the regex in the Referer. The next section disallows them to access files on the server and tosses a 403. Heh, bastards. The next 2 lines define different log files for the stuff tagged as "referer_spam". Easy.
219.235.236.225 - - [07/Feb/2005:14:34:23 -0800] "GET /pictures/index.cgi?mode=album&album=/cars/misc/rally HTTP/1.1"
200 11108 "http://texas-holdem.crescentarian.net/"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iRider 2.21.1108; FDM)"
Notice the texas-holdem stuff. So that appears in my log analysis software, flooding it with this junk. I figure it's either bots that do this on purpose or people who have downloaded spyware/adware. Either way, it's annoying. This is my solution:
SetEnvIfNoCase Referer "(holdem|hole-em|casino|viagra|chatt-nett|diet-pills|poker|mortgage|roulette|valium|phentermine|loans)" referer_spam
order deny,allow
deny from env=referer_spam
CustomLog /home/nathan/logs/www.mybrainhurts.com-access.log combined env=!referer_spam
CustomLog /home/nathan/logs/www.mybrainhurts.com-spam.log combined env=referer_spam
So, the first line sets an environment variable "referer_spam" if it encounters any of the regex in the Referer. The next section
2005/01/14
Nerd Level
18% scored higher,
1% scored the same, and
82% scored lower.
What does this mean? Your nerdiness is:
High-Level Nerd. You are definitely MIT material, apply now!!!.
Haha. Well, at least I know I should have applied to MIT when I could have gone.
Unix command of the day: netstat -p (must run as root)
2004/10/15
Google Desktop
Google Desktop Search Download
It doesn't work with GAIM, Firefox/Mozilla, Thunderbird etc, but it's still an awesome idea and useful for searching my desktop files.
Update: I unintalled this. Apparently it 1) runs as a service and uses RAM 2) indexes everything including my https URL's 3) Doesn't work with enough stuff for me to keep it.
Maybe when v2.0 is out.
It doesn't work with GAIM, Firefox/Mozilla, Thunderbird etc, but it's still an awesome idea and useful for searching my desktop files.
Update: I unintalled this. Apparently it 1) runs as a service and uses RAM 2) indexes everything including my https URL's 3) Doesn't work with enough stuff for me to keep it.
Maybe when v2.0 is out.
2004/09/07
PHP/Flash charts
Whoah, now that's neat! I might have to use this next time I write a graphing web app.
http://www.maani.us/charts
http://www.maani.us/charts
2004/06/10
SonyStyle USA - KV-34HS510
2004/05/31
blogrouter
Aha! So you're wondering how to post pictures directly from your camera phone or other e-mail enabled device. This is what I used: http://hipme.com/software/blogrouter/. A very well written (however sparsely documented) bit of code that will register your device and store it in a database (dbm), process e-mails, extract pictures from them and save them to disk and then post to your Blogger XML RPC enabled blog. I'm using it with the blogger.com service. I had to modify it a tiny bit to get it to do what I want, and I think that since the author is requesting development help, I'll do just that. It's a good bit of code anyhow, I learned quite a bit just from reading thru it. I didn't know you could do this in perl:
@{$var->thing}
Sweet!
I don't like MovableType. The licensing sucks and the interface blows. I tried it for the 2nd time this week, dunno what makes me think that I'd like it the 2nd time around. I am gonna check out some of the other Blogger XML RPC based *open source* packages and see what they offer. I'll post my findings.
@{$var->thing}
Sweet!
I don't like MovableType. The licensing sucks and the interface blows. I tried it for the 2nd time this week, dunno what makes me think that I'd like it the 2nd time around. I am gonna check out some of the other Blogger XML RPC based *open source* packages and see what they offer. I'll post my findings.
2004/05/25
Unix Family Tree
2004/05/21
saving your mail headers
One of the neater ways to save your mail headers on a UNIX box is to use procmail:
:0 hwc: headers.lock
* !^FROM_MAILER
| /usr/local/bin/gzip >> ~/headers.gz
2004/04/14
Keyboard Cleaning
Looks like this:
B/7845210845120-+
t741852963.0
79+865 dxcxccvbvvbbvbnnmnm,m,m,.,.././;';'[;plklkjjuhkghfgfrddfsaas
`12qww2qewer5rtt5y67y7yui8uio[-p=p[]=[]]\-=\-=0-90890789678567456345e342123`1
qAZ QA32wezsd4erxdf5rtfg 3QWEZSDX5RTDFG76TYUGH7YUHJB6TYFGHUOM,. =P[];'./
j
o
M
DGJKL; ]01 `Q32wqaszdx fgthb jhlo9ik]
ki,gthdfaq Q1 `e3wxszrfcv yjbnhikm;pl.]
['ol,i8ujmtgvbdfcedsxqaz QZARDFCYHGBIJKMP;L.]
=[]'P0OL8UJ6TGB5RFC 3ESX34WS1`ewszxr5f cv7yh 89ijkm plo,.-[;'/][p';0opo ki uy6 tr5e23wqqawszdf cghyguhjkij;p/
",. ./ m f czzfrcv hb n.l, l.
B/7845210845120-+
t741852963.0
79+865 dxcxccvbvvbbvbnnmnm,m,m,.,.././;';'[;plklkjjuhkghfgfrddfsaas
`12qww2qewer5rtt5y67y7yui8uio[-p=p[]=[]]\-=\-=0-90890789678567456345e342123`1
qAZ QA32wezsd4erxdf5rtfg 3QWEZSDX5RTDFG76TYUGH7YUHJB6TYFGHUOM,. =P[];'./
j
o
M
DGJKL; ]01 `Q32wqaszdx fgthb jhlo9ik]
ki,gthdfaq Q1 `e3wxszrfcv yjbnhikm;pl.]
['ol,i8ujmtgvbdfcedsxqaz QZARDFCYHGBIJKMP;L.]
=[]'P0OL8UJ6TGB5RFC 3ESX34WS1`ewszxr5f cv7yh 89ijkm plo,.-[;'/][p';0opo ki uy6 tr5e23wqqawszdf cghyguhjkij;p/
",. ./ m f czzfrcv hb n.l, l.