« januari 2006 | Main | maart 2006 »

28 februari 2006

XMLHttpRequest over at XULPlanet

There is some nice documentation of the XMLRequest javascript object over at XULPlanet.

Posted by marko at 02:08 pm | Comments (0)

DOM Event Model

Remember there's more than one way to tie an event to a HTML element. Especially when you are trying to create valid XHTML/XML, you can't just onClick="" everywhere anymore. You need to register your events in a <script> block or file.

Well, another step towards total separation of content (HTML), layout (CSS) and behavior (JavaScript).

Nice description of the various methods to attach an event.
Same information from and about Apple Browsers IE5/Mac.

Add your own ;)

Posted by marko at 01:29 am | Comments (0)

24 februari 2006

Concurrentie

getharvest.jpg

Harvest dat lijkt wel 14Dayz...

Posted by marko at 02:09 pm | Comments (0)

23 februari 2006

AJAX Tip: Hoe ziet de HTML er nu uit?

Op Ajaxian.com (wat heel snel in de afgelopen tijd mijn favoriete blog geworden is) vond ik een set mooie tips om de huidige status van je HTML inzichtelijk te krijgen. Handig want na flink wat geknoei met Ajax in de pagina ziet je HTML er niet meer zo uit als toen je de pagina laadde. Stop ze in je sidebar of in je rechtermuisknop menu. Voor IE7, IE6, en firefox.

IE7:

javascript:''+window.document.body.outerHTML+'';

IE6:
javascript:void(window.open("javascript:''+ opener.window.document.documentElement.outerHTML + ''"));
Met een nieuw venster
FF:
javascript:''+document.getElementsByTagName("html")[0].innerHTML+'';

Posted by marko at 11:07 pm | Comments (0)

22 februari 2006

Redirecting Stderr on Linux/Unix

How do Bash and the other spawn of Bourne Shell shells expect you to redirect stderr. The formal notation is based on the numbers of the file descriptors (where stdin=0, stdout=1 and stderr=2):

wc -l does-not-exist > my.output 2>&1

This causes file descriptor 2 (stderr) to become a copy of file descriptor 1 (stdout), which has already been assigned to the file my.output. Importantly, order counts, so changing to something more like:

wc -l does-not-exist 2>&1 > my.output

will not cause stderr to be redirected to the file: stderr becomes a duplicate of stdout before the redirection is processed by the shell. There's a more succinct way of requesting this dual redirection too that's worth knowing:

wc -l does-not-exist &>my.output

To send stdout to stderr, by the way, you can use this:

echo "this is an error message" >&2

as a convenient shorthand (it's identical to specifying 1>&2).

You can also redirect errors in a pipe by using the 2>&1 notation, as demonstrated here:

wc -l does-not-exist 2>&1 | wc -l

which, if you try it, will correctly count the number of lines in the output stream, which consists of only one line; the error itself.

Posted by marko at 12:56 pm | Comments (0)

Search and Replace over multiple files in Unix/Linux

find ./ -type f -exec sed -i 's/brem.brains4all.com/www.campingdebrem.nl/' {} \;

This works on systems with sed -V reports version 4 or higher. luckily it is included in RedHat 9. It's not in RedHet 8, so that means devel is out. I *have* to upgrade that host one of these days....

Posted by marko at 11:20 am | Comments (0)

21 februari 2006

How to Change the Timezone in Linux

It's possible to change the system timezone in Linux in a few short steps.

Steps

1. Logged in as root, check which timezone your machine is currently using by executing `clock`. You'll see something like "Mon 17 Jan 2005 12:15:08 PM PST -0.461203 seconds", PST in this case is the current timezone.
2. Change to the directory to /usr/share/zoneinfo, here you will find a list of time zone regions. Change to the most appropriate region, if you live in Canada or the US this directory is the "Americas" directory.
3. If you wish, backup the previous timezone configuration by copying it to a different location. Such as `cp /etc/localtime /etc/localtime-old`.
4. Copy over the most appropriate timezone to /etc/localtime. Example: `cp Los_Angeles /etc/localtime`.
5. If you have the utility rdate, update the current system time by executing `/usr/bin/rdate -s time.nist.gov`.
6. Set the hardware clock by executing: ` /sbin/hwclock --systohc`

Posted by marko at 02:09 pm | Comments (0)

15 februari 2006

automatic loading of kernel modules/modprobe

I was looking for this solution after devel.brains4all.com went down last night after a fuse had blown. Forgot to reload the tunneling kernel module (tun) with

modprobe tun
(duh!). Figured out it could start itself automatically when needed if you make an alias in /etc/modules.conf like this:
alias tun0 tun

The kernel loads this module when you try to access a network interface (maybe by running ifconfig against it) and no network device driver has registered to serve an interface by that name, the kernel requests the module named the same as the interface name (e.g. eth0). This applies to drivers for non-physical interfaces such as ppp0 as well.
Ifconfig is run by
/etc/init.d/vtund start

Could be that you suffer some firewall problems. Let me know.

Posted by marko at 11:59 pm | Comments (0)

14 februari 2006

Brains4All Googlecloud

googlecloud.gif

Als we nu eens dit gebruiken op te zoeken, wat gebeurt er dan?

Posted by marko at 11:52 pm | Comments (0)

10 februari 2006

'Tail' voor windows

Onder linux heb je het handige commando 'tail', om toevoegingen aan een textbestandje 'live' te zien. Erg handig als je bijvoorbeeld een logfile wilt volgen. Ik heb een equivalent voor Windows gevonden. Hij staat hier:
SOFTWARE\Development\Tail4Windows\Tail.exe.

Kopieer het bestand naar een map binnen je Windows path (bijvoorbeeld C:\Windows) en typ in een commandline venster:
tail pad/naar/logfile.txt -f (let op: -f dus ACHTER de bestandsnaam!)

Posted by bart at 01:36 pm | Comments (0)

08 februari 2006

Gratis MX back up (fallback mail servers) van rollernet.us

rollernet_us.gif

Ik was al een poosje op zoek naar een goede oplossing voor mail backups of mail fallback voor onze MX hosts zoals dat heet. Omdat we nu onze eigen mailserver draaien moeten we er ook voor zorgen dat als we even uit de lucht zijn er geen mail van onzelf of onze klanten kwijtraakt. Ik was op zoek naar een betaalde host maar ik vond rollernet.us, een gratis dienst met een nog betere service dan de meeste betaalde diensten. Ze bieden betaald een aantal extra services voor $ 30 en zijn daarmee nog significant goedkoper dan de meeste concurrenten ook. We hebben een account daar inloggen via https op https://acc.rollernet.us username: brains4all de mail configuratie staat op https://acc.rollernet.us/mail/

rollernet.gif

Als we nu voor een klant mail gaan hosten moet je de DNS (dnsadmin.qdc.nl) als volgt instellen:

MX prio 10 mail.brains4all.com
MX prio 20 mail.rollernet.us
MX prio 20 mail2.rollernet.us

Let op dat je niet een rollernet.us host op prio 10 instelt, bij qdc is prio 10 de default.

Let op dat we voor domeinen waar iedere mailbox een eigen mailbox of server heeft elders we alleen mail box forwards instellen bij dnasadmin van qdc en geen mail inrichten voor deze klanten.

Op onze postfixadmin (mail.brains4all.com/admin) het virtual domain toevoegen en instellen.

Op rollernet (acc.rollernet.us/mail/) het virtual domain toeveogen en instellen.

Logging: All
Slow Delivery: Disabled

Recipient Maps, Client Checks en Address Mapping allemaal op defaults laten staan.

Onderhoud:
* Check elke week de mail queues en verstuur desnoods handmatig.
* Check elke week de logs.

De queues worden maximaal 21 dagen bewaard, genoeg om je mailserver weer te kunnen fixen lijkt me.

Als het iets is deze service vind ik wel dat we moeten upgraden naar een betaald account, want dit vind ik echt een super service!

Posted by marko at 11:36 pm | Comments (0)

image resizing using Javascript

scaler_2.jpg

En ik vond een mooie tip voor: Image resizing using Javascript

Posted by marko at 01:24 pm | Comments (0)

Een kaartje van je bezoekers

gvisit.jpg

Op gvisit.com kun je een stukje javascript krijgen waardoor ze een kaartje met de positie van je bezoekers maken voor je.

Posted by marko at 01:16 pm | Comments (0)

03 februari 2006

JSLog - a Lightweight Ajax logger

jslog-expanded.gif

JSLog is a lightweight, self-contained logging panel which takes the place of alert() boxes for your AJAX and DHTML applications. It is unobtrusive, easy to use, and can stay in your code through deployment.

Why:
Ajax development is easier when you have a logging system like this:

* convenient: always a click away ;
* asynchronous: no need to acknowledge each message ;
* can be turned on or off globally with a simple config change ;
* easy to use: just include one .js on your page ;
* stays in your code throughout development and deployment ;
* lightweight: just over 6 Kb & places just two tokens into the namespace ;
* framework agnostic: Like Prototype? Mochikit? Rico? Dojo? JSLog works with all of them!

Posted by marko at 12:08 pm | Comments (0)

Stikipad lanceert (bekend?)

stickipad.jpg

Sound the trumpets, light the fireworks and dust off those dancing shoes, StikiPad has arrived!

Het lijkt wel heel erg op een site die ik al eens gezien heb... :) Wat ik er goed aan vind is de profesionele uitstraling en het gevoel dat het "af" is. Wel een beetje heel uitgekleede versie die gratis is. En de features lijst lijkt me een beetje groot. :) (hebben de devolpers gedaan, denk ik:) Wel degelijk het compleetste wiki concept wat ik ooit gezien heb, en e.e.a. ziet er goed uit!

Posted by marko at 12:52 am | Comments (0)

01 februari 2006

Too hard to convert an atheist

GuyKawasaki.gifOp de weblog van Chris Tung lees ik over een samenvatting van "Guy Kawasaki's recent talk about The Art of Evangelism." Interressante shit voor ons predikers.

Guy Kawasaki, former chief evangelist for Apple, is witty, engaging and inspirational both on paper and in person. So, when he came to speak about "The Art of Evangelism", I couldn't pass up the opportunity to hear him and his 10 (okay, 11) rules of thumb for evangelizing your product, service or cause.
Too hard to convert an atheist
* Look for believers and agnostics
* Fix for who's buying (this makes them love the product more and become even better evangelists), not for who's not buying, never for those who don't want to buy.
http://www.lukew.com/ff/entry.asp?272 http://blog.guykawasaki.com/

Posted by marko at 11:14 pm | Comments (0)

Webmail

sm_logo.jpg
Omdat we nu toch een eigen webserver hebben, heb ik wat zitten spelen met webmail. Ik heb Squirrelmail geinstalleerd op: http://people.brains4all.com/webmail/.

Zo te zien werkt het allemaal wel. Af en toe zijn er nog wel wat rare dingen. De taal staat standaard op Nederlands ingesteld. Soms klik je op een link (bijv. je inbox) en dat is alles opeens Engels. Nog 1 of 2 keer klikken op dezelfde link maakt de pagina dan vaak weer Nederlands???

Ik heb ook last van een vreemd probleem: ik heb een account ingesteld in Thunderbird, met de instelling "Laat een kopie van berichten 7 dagen op de server staan". Elke keer bij het ophalen van nieuwe mail haalt ie alle berichten op, dus ook degene die hij al eerder had opgehaald. Bij andere accounts heb ik dit probleem niet. Is dit een Thunderbird of Imap probleem???

Posted by bart at 09:44 pm | Comments (0)