Category ArchiveTech
Category ArchiveTech
jQuery & Internet & Programming Daantje on 26 Aug 2011
It’s a little jquery patch I wrote after I found this post. I think this works better…. and in all browsers… Just copy it somewhere after the DOM is ready. (jquery.ready())
What the problem is; :hover is a css pseudo selector, but a event state in Javascript. (Or some thing like that…) So it only gives the right color on mouse over. Only than the selector is valid.
The fix is simple; rebuild the element on mouse over, so you find the right color. The rebuild has only to be done the first time you role over it. And after reading the Typeface-js source, I found the render method hack to fix the un-rendered text element in the new color. Done is my mesh up. Have fun with it.
$(".typeface-js a,a.typeface-js").hover(
function(){
if(!$(this).hasClass('typeface-js-hover-checked')){
$(this).wrapInner('<span class="typeface-js-normal"></span>').append($('<span class="typeface-js-hover"></span>').text($(this).text()).css('color',$(this).css('color'))).addClass('typeface-js-hover-checked');
_typeface_js.renderDocument();
}
$(this).find('.typeface-js-normal').hide();
$(this).find('.typeface-js-hover').show();
},
function(){
$(this).find('.typeface-js-normal').show();
$(this).find('.typeface-js-hover').hide();
}
);
Frustrations & Windows & Programming Daantje on 09 Mar 2010
I found a real strange bug. A client of mine has two sites. One I host, the other is hosted by a 3th party. Now the client has a domain control panel for the other site and rerouted the other domain to the one I host, but the system just makes a frameset. Not real SEO, but okay. After a few days bug reports came in. Can not log in etc. Can only be the sessions? But after testing I found that the bug only appears in Internet Explorer (tested only 8) and only on the rerouted domain, not the one I host. Fix was easy. Just added a little javascript to break out of the top frameset and everyting was working again. I think it’s Microsoft’s Phishing filter that is kicking in, but have to test further.
Here’s my litte fix: :-)
if(top.frames.length){
top.location.href = self.location.href;
}
iPhone & Frustrations Daantje on 02 Sep 2009
Yes! My love is working again! I broke my touch screen last month and had to fall back on my Nokia 9300i. Not nice when you are used to an iPhone! After some calls to some iCenters and Apple stores, I found that it was not possible to fix my iPhone trough regular channels. After some googling I found a small company here in the Netherlands that was happy to send me a new screen for €49,- excl. €7,- shipping. So I ordered one and within two days I had my screen! Best service ever! So if some part of your iPhone is broken, check this site for parts: www.ipod-service.nl The company can fix your phone too, if you want to send your iPhone to them, so give them an e-mail if you have questions! Real nice people!
iPhone Daantje on 17 Jun 2009
I’ve just upgraded my iPhone to the latest 3.0 release… It was immediately simlocked! “Simlock active.” Why?! My iPhone is from Czech Republic, where they are sold simlock free! After a panic I found a way to get around this… Just restart the phone without a simcard. Open up iTunes, put back in the simcard and wait for iTunes to unlock the card. And we are happy campers! The phone restarts automaticly… And after boot, all files are synced back to the phone… Need a drink now. Stress full moments…
iPhone & iPod Daantje on 11 May 2009
Forgot to post that I have my iPhone. I have it for a month now and it is really the best phone i’ve owned ever! Some drawbacks… Only apps from the appstore can be installed without jailbreaking. There is not a free IRC client in the appstore. There is not a free SSH client in the appstore. When you want to develop your self, to get your app on the appstore, you’ll have to pay Apple $200 for a free app and $500 and 30% of all income for a payed app. No copy paste function (yet). Rest it is realy the best toy ever!
Update: check this article on Slashdot… “Apple Refusing Any BitTorrent Related Apps?”
Debian & Tech & Personal Daantje on 10 Mar 2009
I’ve revised my post on how to convert an Axis webcam stream to Flash (.swf/.flv). Check my post: http://www.daantje.nl/2007/05/07/convert-axis-webcam-stream-to-flash-swfflv/
eee & Debian & Linux Daantje on 25 Feb 2009
After installing Mac-OS X Tiger, Ubuntu-eee and Xandros on my Asus EEE-pc 900, I now swiched to Debian Lenny. Installing was easy. Running a normal Gnome now. For the wireless I used these links:
http://www.thinkwiki.org/wiki/Installing_Debian_5.0_(Lenny)_on_a_ThinkPad_X200#Atheros_Chipset
http://wiki.debian.org/NetworkManager
http://wiki.debian.org/WiFi/HowToUse
Everything else worked out of the box ;) Nice and easy installer too! I think this one is a keeper. And I love Debian!
MacOS & Personal Daantje on 05 Oct 2008
Just here because I keep forgetting how to get the whole window… Stupid me ;)
LDAP & Debian & Linux & MacOS Daantje on 05 Oct 2008
I’ve attempted this a lot of times. Now it works (sort of, but it still needs some tweaking). What you’ll need is a Debian server running a slapd daemon. You can get this with apt-get, of course… It could be handy to have the utils too and I use the GPL-ed handy web based ldap management tool phpldapadmin. I like it, it’s small and easy to work with… So the apt-get command should be like;
apt-get install slapd ldap-utils phpldapadmin
Now after you’ve configured your slapd and phpldapadmin you should be able to login into your ldap server. I used phpldapadmin for that. Remember that you’ll have to use the DN you’ve configured earlier. It look something like ‘cn=admin,dc=subdomain,dc=domain,dc=com’. Yes it’s the complete string, not only ‘admin’!
Now go to addressbookserver.com and download the latest version of ABxLDAP (AddressBook X LDAP), I’ve used for this how to ‘ABxLDAP_v1.1.16_31_May_2008.dmg’.
After you’ve installed it, check the mounted disk image. You should have a file called ‘abxldap.schema‘, it can be found in the folder ‘LDAP Schema Extension’. This file should be uploaded and placed into ‘/etc/ldap/schema’ on your Debian server. Edit your /etc/ldap/slapd.conf and add the schema with this include line;
include /etc/ldap/schema/abxldap.schema
Now restart the ldap server…
/etc/init.d/slapd restart
Now comes the magic… You’ll have to populate the ldap directory, so ABxLDAP can sync with it… What I did was this:
I’ve made a text file called ‘populate.ldif‘. This file contains the following text:
dn: ou=addressbook,dc=subdomain,dc=domain,dc=com objectClass: organizationalUnit ou: addressbook
NOTE: ‘dc=subdomain,dc=domain,dc=com’ should be what ever you’ve configured slapd with in the first step!
Now use phpldapadmin to import the ‘populate.ldif‘ into your ldap directory. When you don’t have any errors, you should be able to sync with ABxLDAP for the first time.
Go to your System Preferences on your Mac and pick the ABxLDAP panel. Fill all the fields. What I use is this:

That’s it, all should be working fine. Every time you edit something in your Address Book on your Mac, it should sync the whole ldap. Also when you delete or edit a record directly on your ldap, it will sync. The only thing I’ve to figure out is, how to sync periodically, so the Mac always have the latest version. Now it only syncs when something is changed in your Address Book, or when you hit the sync button in your ABxLDAP in System Preferences.
Almost forgot to mention. In case of troubleshooting set in slapd.conf loglevel to 448 instead of 0 to get debug log messages in /var/log/syslog.
So more is coming later… Now it’s time for a beer!
eee & Debian & Internet & Windows Daantje on 04 Oct 2008
I want to have internet all the time. And I have… I have a HTC Touch Cruise running Windows Mobile 6.1 Pro with a HSDPA connection. Now this is a way to connect the EEE to the HTC via bluetooth and use the windows mobile device as a gateway to the internet. By the way, I’m running Ubuntu-eee… If you are running Xandros, the default distro, try to Google on “Xandros bnep0 windows mobile”
First get the right software. Open a terminal and install the Bluez gnome utilities.
sudo apt-get update
sudo apt-get install bluez-gnome
Now open the file ‘/etc/default/bluetooth’ and be sure that the following is set;
BLUETOOTH_ENABLED=1
PAND_ENABLED=1
Now I did a reboot, you could restart some services, but I was lazy. Now, after you insert your Bluetooth dongle (or when you have it build in), you should have a bluetooth icon in the upper right corner. With that tool you should be able to pair with your Windows Mobile device. If you don’t know how, try it the other way around, use your mobile to pair with your eee. After the exchange op pins the two devices should be paired.
Open up the terminal again and do the following command to scan for your mobile…
sudo hcitool scan
You should get something like this;
Scanning ...
00:17:83:xx:xx:xx HTC_P3650
This is the mac address of your mobile device and you’ll need it later on to connect.
Okay, we have a working bluetooth dongle and we can see the mobile… Now some config we need to have to get the link working. Append the following to ‘/etc/network/interfaces‘;
iface bnep0 inet manual
down dhclient -r -pf /var/run/dhclient.$IFACE.pid $IFACE
down pand -K
up pand -Q -n
up dhclient -pf /var/run/dhclient.$IFACE.pid $IFACE
We are done configuring the eee. The following steps should be made every time you want to get the eee online:
Open on your Windows Mobile device the application ‘Internet Sharing’, you can find it in your Programs folder. Start a Bluetooth PAN connection and wait for it to start.
Open up a terminal on you eee and do:
sudo pand -c 00:17:83:xx:xx:xx -n
Ofcource, you’ll have to replace the 00:17:83:xx:xx:xx with the mac address of your device.
You should get this as result:
pand[8033]: Bluetooth PAN daemon version 3.26
pand[8033]: Connecting to 00:17:83:xx:xx:xx
pand[8033]: bnep0 connected
Now bring the network interface up and get an IP from the windows mobile device:
sudo ifup bnep0
Now wait for the following result, it should look something like this:
pand[8060]: Bluetooth PAN daemon version 3.26 pand[8060]: Inquiring pand[8060]: Searching for NAP on 00:17:83:xx:xx:xx pand[8060]: Connecting to 00:17:83:xx:xx:xx pand[8060]: Connect to 00:17:83:xx:xx:xx failed. Connection refused(111) pand[8060]: Searching for NAP on 00:16:CB:xx:xx:xx Internet Systems Consortium DHCP Client V3.0.6 Copyright 2004-2007 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ wifi0: unknown hardware address type 801 wifi0: unknown hardware address type 801 Listening on LPF/bnep0/00:10:60:a2:8c:dd Sending on LPF/bnep0/00:10:60:a2:8c:dd Sending on Socket/fallback DHCPREQUEST of 192.168.0.85 on bnep0 to 255.255.255.255 port 67 DHCPACK of 192.168.0.85 from 192.168.0.1 bound to 192.168.0.85 -- renewal in 111983 seconds.
YES! We have an IP! You can double check with the ‘ifconfig’ command, or just try to open up Firefox and start browsing ;) Now close your eee, walk to the pub, get a nice cold one. Open your eee and start browsing the net ;) w00t!
To get the interface down again, use:
sudo ifconfig bnep0 down
Most of the info I’ve used, can be found in this forum post. Ive written a little shell shell script to bring the connection up, because it’s hard to remember all of this after some beers ;)
#!/bin/sh
sudo pand -c 00:17:83:xx:xx:xx -n
sleep 5
sudo ifup bnep0
echo "Drink beer!"
Don’t forget to make the file executable with ‘chmod +x myscript.sh’, or something like that…
Purchase Cheap Oem Adobe Flash Professional Cs5 In German
Buy Microsoft Windows 7 Ultimate Sp1 Online Microsoft Office 2010 Visio Premium Online Purchase Adobe Dreamweaver Cs5 Online Oem Adobe Dreamweaver Cs5 In German Online Purchase Microsoft Windows Vista Ultimate Sp1 Online Purchase Discounted Microsoft Office 2008 For Mac Online Purchase Adobe Creative Suite 4 Design Premium Buy Cheap Adobe Photoshop Lightroom 3.2 In German Online Buy Cheap Adobe Photoshop Cs3 ExtendedBuy Cheap Oem Microsoft Office 2004 Pro For Mac
Buy Discounted Oem Adobe Creative Suite 5.5 Master Collection
Purchase Discounted Oem Microsoft Office 2003 Professional Edition Purchase Cheap Adobe Photoshop Cs3 Extended Online Cheap Oem Adobe Fireworks Cs4 For Mac Discounted Oem Adobe Acrobat 8 Pro For Mac Online Purchase Discounted Adobe Creative Suite 5.5 Master Collection Multilanguage Online Purchase Cheap Adobe Premiere Pro Cs5.5 Online