RSS

Count the comments!

2012/07/05 filed under /nanoblogger

I'm very new to NanoBlogger, yet impressed by it's power and coolness.

After installing CGIComment I realized there's no counter of comments per post. There's of course comment_cnt.sh by dams, but I didn't really fancy the idea of using wget for this task. The .db files didn't look that hard to parse, so here's the overkill-oneliner-that-should-have-been-shorter.

First you will have to edit the blog.conf and add CGICOMMENT_DIR="" with the path to your CGIComment directory:

# CGIComment directory
CGICOMMENT_DIR="$BLOG_DIR/cgicomment"

After that, create the file comment_count.sh in your $BASE_URL/plugins/entry/ directory:

# NanoBlogger plugin to get number of (cgicomment) comments without wget
# by B10m, 2005 (http://menno.b10m.net/)

NB_EntryCommentCount=$(grep -c "^$(sed -ne \
  "s/^\([0-9]*\)|archives\/$permalink_entry$/\\1/p" \
  $CGICOMMENT_DIR/comments/articles.db 2>/dev/null)|" \
  $CGICOMMENT_DIR/comments/comments.db 2>/dev/null) 

if [[ -z $NB_EntryCommentCount ]]; then NB_EntryCommentCount=0; fi

(UPDATE: Removed the `echo` calls to prevent unwanted output in archives/index.html)

To be compatible with comment_cnt.sh, I used the same variable $NB_EntryCommentCount,so (if not already done) alter your templates (entry.html, permalink_entry.html) accordingly:

<a href="$BLOG_URL_ACTION$ARCHIVES_DIR/$permalink_entry#comments">Comments</a>
 ($NB_EntryCommentCount)

Final note: as with comment_cnt.sh, the counter will only be updated each time you rebuild your blog!

Posted by: B10m | permanent link | comments (3)

WWW::Mechanize::Plugin::Web::Scraper

2012/07/05 filed under /perl

Joffie asked me if Web::Scraper could handle authentication while retrieving the website in question. A good question and after digging in Tatsuhiko's code, I noticed that you can simply dump HTML in the scrape function, instead of just the documented URI object.

I remembered Tatsuhiko mentioning integration with WWW::Mechanize somewhere but I couldn't find anything yet. So I decided to write the little Mechanize plugin. Shockingly, and completely surprising, it now carries the name WWW::Mechanize::Plugin::Web::Scraper.

Scrape the planet!

Posted by: B10m | permanent link | comments (1)

Belated Honeymoon

2012/07/05 filed under /personal

Almost 3 months after my (first) marriage in Indonesia, we finally go on our honeymoon (yay!). Since my beloved wife has been everywhere already, except for Prague, Czech Republic, we will hang out in the city for about a week.

I have been there once before and can't wait to go back. The city is (or at least was, when I was there) really beautiful and fun. Can't wait to take pictures of the Sedlec Ossuary!

So, for about a week, don't expect much updates. Well ... Prague has many semi-decent Internet Cafes, so who knows ;-)

... but since I leave the country, my server will probably break down, as usual

Posted by: B10m | permanent link | comments (2)

Spammer somewhat right

2012/07/05 filed under /web

The spam filters at my work aren't too good, so my Thunderbird filtering has a lot to do. Some spam, I get very often, is a mail with some weird text (probably Markov generated content), and an image like this

spam image

Since we're already comparing spam mails for the prices of VlIAgR4 at work (for fun), I decided to track the spamvertized stock.

The date is odd, for October 18th 2006 would be a Wednesday, last time I checked, yet since they constantly use the word Thursday, I assume the mean October 19th, today.

The funny thing is that that stock did go pretty good today. It went up 100%, according to Yahoo! Finance

XTPT.PK on Yahoo!

Now that made me wonder. Was this incidental, or did people actually buy this stock, based on the spam? Well, let's keep track of such emails.

Today I also received this one, so let's see what happens tomorrow!

------------------------------------
Company name: Texhoma Energy, Inc.
Stock symbol: TXHE.PK
Current price: 0.12 (up 50% this week)
Expected price 10/20/2006: 0.52
------------------------------------

The information mentioned herein has not been released to the
general public and should be kept confidential until its
scheduled announcement on Friday, October 20.  I strongly suggest
that you get in before then.
[snip spam]

For some reason I doubt it's confidential, since it was mailed to an email account of mine I barely use and can be harvested easily ;-)

Posted by: B10m | permanent link | comments (2)

Testostoronical birthday presents

2012/07/05 filed under /personal

Tools Being the 30th of June my birthday, I invited my family over to celebrate this somewhat happy occasion (yeah, one year closer to my death, yay!). And the good part about birthday parties: presents!

Since I lost my never ending wishlist (I always knew a million things when I was a kid), it's extremely hard to find nice gifts for me. But this year, my dad decided it was time for me to get some work done myself (so he doesn't have to come over for everything ;-) So he bought me a hammer-drill and cordless screwdriver!

Call me Tim -the toolman- Taylor or whatever you like, but these testosterone level raising tools are just awesome. After the family was gone, I started drilling holes straight away (to put the towel hanger-thingy on the bathroom wall). After succeeding, I felt the urge to go hunting and eat raw meat.

But luckily my wife appreciates the less masculine and true nerd side of me too, by giving me the TFT monitor :-)

Posted by: B10m | permanent link | comments (1)

Google eq. Evil

2012/07/05 filed under /web

Before I have blogged about my bad feelings on Google and today, I feel the need to stress the point again. Google is Evil!

Of course I could just list all the complaints http://www.google-watch.org/ lists, but let's look what Google has done up till now in a bigger frame. It is however good to read about the infamous Google cookie.

The beginning

Google started nice. A website without bells and whistles and a heck of a good search engine. Wonderful. Nerds all over the world loved it and not too long after, the non-geeky people followed. Google grew to become a "verb".

USENET

So far so good. Then Google slowly started taking over tricks of yet another evil: Microsoft. The started to take over companies and care about shareholders. But, even worse, they started collecting. And what they couldn't collect anymore they bought.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET

News

Google News, yet another invention. By collecting news from various sources, you can quickly scan all the news you'd like to see. They even allow you to add alerts so you can get an email when breaking news comes in, matching your keywords.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in

Blog

In 2003, Google acquired Pyra Labs and became the home for Blogger. Like other Google services, they didn't really invent some complete new concept, they just offered a lot of megabytes for doing a something a lot of people already did: blogging. Most blogs are about personal events in people's life so:

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life

In this year, Google also came up with the personalized search. A great way to know who even more about your personal preferences.

E-mail

Gmail followed not long after. The motto was (and still is) "Don't throw anything away". It fits the Google collecting spirit perfectly.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail

Pictures

Picasa, Inc was the next victim of Google's need to expand. Picasa would make it easier to share pictures (through hello.com).

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail
  • what you take pictures of

Telephone

What other means do people use to communicate? Phones! And before you knew it Google SMS was launched.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail
  • what you take pictures of
  • your phone number

Proxy

To know even more about your web-surfing behavior, Google offers Google Web Accelerator. It's mainly just a proxy.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail
  • what you take pictures of
  • your phone number
  • what websites you visit

Instant Messaging

But, what about the other popular method of communication, instant messaging? Sure: Google Talk. Many IM services exist already (Jabber, MSN, AIM, ICQ, Y!M), yet we seem to need just-another-Jabber-client.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail
  • what you take pictures of
  • your phone number
  • what websites you visit
  • what you chat about and with whom

Wi-Fi

The latest plans as of yet are to provide the city of San Francisco with Wi-Fi. The whole city will have to become on big Google hotspot.

Where are we now? Google knows:

  • what you search for online
  • what you post(ed) on USENET
  • what news events you're interested in
  • what happens in your life
  • what you send and receive by e-mail
  • what you take pictures of
  • your phone number
  • what websites you visit
  • what you chat about and with whom
  • everything you do over unencrypted lines

Other services

There are other dubious Google services out there. Think about the Google Toolbar, the Google Deskbar, Froogle, Google Desktop Search, Google Ride Finder, and many, many more. It's just too much to comment on all of them, and you'll get the basic idea. They most likely all collect data.

Where does this go?

Why would Google want to capture everything the can about you? This world knows very few to no people who do things just out of being nice, so what is going on exactly? Who could benefit from all this information?

I am absolutely not saying this is true, but what comes to my mind is: governments, and spammers. Yes, very conspiracy theory'ish, but until I have seen a better explanation, I'll stick with this.

Regardless of who will benefit from all the information, do you really want anyone to know all of this about you?

Time to drop Google and look for alternatives. Clusty seems as a nice search engine alternative. Email shouldn't be a problem for anyone nowadays, but if it is, have a look at hushmail.com for free webmail with PGP encryption. Instead of Google Talk, you can just use any Jabber server out there. Need a blog? Try livejournal or install some software on your own webspace (most ISPs give you some for free).

The only thing we all are stuck with is groups.google.com. If Google was really about sharing information, they'd open up the old DejaNews archives for anyone to download. Until then, we have to get used to the new, crappy interface.


  'Google is Evil'
   -rw-rw-rw-  1 satan demons  0 Jun 06 06:06 google
Posted by: B10m | permanent link | comments (0)
return-member