August 2006 Archives

Do Aug 31 11:53:45 CEST 2006

digg this bookmarklet

Just as a tiny by-product during cleaning up my bookmarks I wrote some useful bookmarklets. Simply drag & drop them into your bookmark toolbar if desired:

Bookmarklet to digg (digg.com) the currently viewed website:

<a href="javascript:location.href='http://digg.com/submit?phase=2&url=' 
+escape(document.location.href)+'">digg it!</a>
Drag'n'drop this link: digg it

Add page to del.icio.us:

<a href="javascript:location.href='http://del.icio.us/post?v=2&title='
+escape(document.title)+'&url='+escape(document.location.href)">delIcioIs</a>
Drag'n'drop this link: delIcioUs

Look up in Wikipedia:

javascript:
function extractmarked(fenetre) {
	if(fenetre.window.getSelection) { 
		return fenetre.window.getSelection(); 
	}
	if(fenetre.document.getSelection) {
		return fenetre.document.getSelection();
	}
	if(fenetre.document.selection){ 
		return fenetre.document.selection.createRange().text; 
	}
	if(fenetre.selectionStart != null) { 
		var s = fenetre.selectionStart; 
		var e = fenetre.selectionEnd; 
		return fenetre.value.substring(s,e); 
	}
	return '';
}
var framez=top.frames;
markedword=extractmarked(self);
if(markedword=='') {
	for(cur_frame=0;cur_frame<framez.length;cur_frame++) {
		if(markedword == '')
			markedword=extractmarked(framez[cur_frame]);
	}
}
if(markedword!='') {
	void(wiki=open('http://en.wikipedia.org/wiki/'+markedword,'',
	     'scrollbars,menubar,location,toolbar,status,resizable')
} 
Drag'n'drop this link: wikipedia

( Note to self: Firefox sometimes won't accept to drop links into its toolbar if they contain too many whitespace. Adding them via right mouse button is possible anyways. )


Posted by iso | Permanent Link | Tags: warez, web2.0, nerd stuff | comments >>

Di Aug 29 14:23:10 CEST 2006

colbert + ipod

A couple of days ago Steven Colbert did announce a green screen contest:

The contest is sill ongoing - take a look at the official site for updates - a really great video ( i.e. great ad ) did enter the contest today:


Posted by iso | Permanent Link | Tags: nerd stuff, video | comments >>

Di Aug 29 01:02:52 CEST 2006

tiny pingback server implemented

Okay, that did not take too long. After reading the aforementioned pingback-definition I wrote a little pingback server in php, which is starting its service right now at this moment.
At first I wanted to look at other implementations or at least a real life example beforehand, but then I was a bit lazy, gave up looking for pieces of information about pingback and started coding right away.

In my therefore pretty quick analysis of available pingback servers I came across several huge xmlrpc monsters and did not care to even take a look at them. At the end of the day all this pingback server really has to do is receive TWO parameters, save them and on success return ANY string. How on earth can they use >30kb for such a task ?!

That's why my pingback script only has about 70 lines of php code and within that features like:

  • checking source & target for validity & sanity
  • checking source for several spam possibilities
  • retrieving meta data from source
  • updating possible already saved pingbacks from that blog
.. and stuff.

The only problem is:
I have not yet taken a look at a single byte of a real pingback request or a response. That's why I can only guess it works and wait until I receive a first working pingback..

( I might put the script up for download at a later time )


Posted by iso | Permanent Link | Tags: php, web2.0, nerd stuff, about | comments >>

Mo Aug 28 15:08:42 CEST 2006

blog setup

I received several questions to this date concerning my blog setup. To set things straight: Due to many reasons I installed nanoblogger and liked it instantly. The big plus it brings with is that all pages are generated after each change thus being lightening fast to deliver. And the big usability benefit: it comes with a command line tool to enter blog entries. In fact, this command line tool is of course the whole blog script. Anyhow, there were (and still are) some things I was missing:

  • Comments
    Blogs w/o feedback option suck. Although there seems to be a nb-plugin for comments available I did not even take a look at it. I saw the comment-feature on the nanoblogger-website and did not like it at all. So I hacked a quick php script to save comments and added a tiny bit of javascript magic to embed it into the view. As state of the art gimmicks it loads the comments via sort-of-ajax and has gravatar.com support included. Of course, it also degrades rather gracefully.
  • Tags
    One of the things I like in this huge web2.0 mumbo jumbo is the use of tags and tagclouds in general. For example if you take just a quick look at the tagcloud on the right side of this page you will notice within merely a second that this blog is (at least at the time being) mostly about "nerd stuff" and "annoyance"s - great feature!
    The nb-categories were a perfect place to extend them into tags. I made a quick'n'dirty perl script which translates parts/category_links.html right after its creation. Also I commented out the experimental naming of the category-links therefore being able to even include matching microformat rel-tag.
  • Track- & Pingback
    I have not yet added it but will do so when time is available for that. I will definitely add pingback support to the whole blog, simply because trackback sucks so incredibly much while pingback is well defined and easy to integrate. Trackback might even not be possible without huge modifications, I did not really look into that after discovering it includes rdf-blocks for each article. Aargh.

I will surely add more features to this blog in the future. Sadly, the add-ons required modifications to the nanoblogger source, which is why I don't release them at this point.
If you want to take a look at those scripts I made then please drop me a line via icq, irc or email and I will send them to you.

Edit: I have implemented a tiny pingback-server.

Posted by iso | Permanent Link | Tags: warez, web2.0, about | comments >>

So Aug 27 12:57:53 CEST 2006

php daily annoyances

I do a lot of stuff in php. And it actually seems extremely adequate to a whole lot of situations. Still I get annoyed by it on a daily basis. Just a tiny collection of what got on my nerves today:

  • mysql_connect & mysql_pconnect won't establish a new connection if you only change the port number. you'll have to restart the webserver to take effect. If it's your own webserver you'll have no problem doing so. If however, that webserver does not run under your control...
  • i really hate this: strip_tags() and stripslashes() - who on earth does think of those names?! it's like in_array($needle, $haystack) vs. strpos($haystack, $needle) - are those string/array guys not talking to each other ? Oh, guess what the opposite of htmlentities() might be called ! Gave up ? It's html_entity_decode()
  • the error message in your server's error.log
    .htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    is caused by .. ? It's the webserver missing rights to read the directory! okay, it is a stupid error but having this in the log is way more stupid as most people discovering that error message will look for a probably non existent htaccess file forever.

These are just things that got on my nerves today, for a more in depth description of why php sucks go to heckmeck! [german].


Posted by iso | Permanent Link | Tags: php, nerd stuff, annoyance | comments >>

Fr Aug 25 13:09:28 CEST 2006

scp annoyance with colons

OpenSsh is great. No doubt. For example, ssh'ing -L is truly a killer feature. However, I never really dug scp.
Now i know filenames should not contain colons. Still, it is really annoying to copy files containing such a character via scp. It will take the colon as a host:port-seperator and obviously fails to connect. No escape symbolism will make it acknowledge the colon belongs to a filename. In fact, the most easy solution seems to be to rename the file - or to use a localhost: prefix but that requires an sshd to run on localhost and would be way too absurd.


Posted by iso | Permanent Link | Tags: nerd stuff, annoyance, ssh | comments >>

Mo Aug 21 01:50:11 CEST 2006

xserver xorg core b0rken

In the past months I really learned to appreciate the ubuntu distribution. In fact, I really like it. But, finally, my trusty Home-Desktop running Breezy Badger was broken a couple of minutes ago.
I just did an apt-get upgrade which installed a new version of xserver-xorg-core (10.3) and even the running X-Server Session was completely broken and on restart unable to start presumeably due to not finding its radeon modules. Although that problem is easily fixed ( sudo aptitude install xserver-xorg-core=1:1.0.2-0ubuntu10 ) it definitely is a level of packaging-error that will break a hell of a lot of systems. Ubuntu users are usually GUI-accustomed and will in large numbers not be aware of how to even upgrade once a new package is distributed - or how to use lynx (which, iirc is not installed by default). Of course, there always is the possibility to use the live-CD to rescue your installation but again most novice users will not (i guess) be aware of that fact.

Edit: It now says on ubuntu.com that there has been an error and there are very detailed instructions on how to fix it.