Saturday 2 August 2008

Stopping painfully slow backup on itunes/MAc and firmware 2.0

Well, I have been suffering for a long time from this issue. Every time I want to syn my iTouch wiht my mac, it takes ages. After googling a bit for a solution, it is straightforward:


1. - Quit iTunes.
2. - Open Terminal.app
3. - Copy and paste this in, then hit return:

defaults write com.apple.iTunes AutomaticDeviceBackupsDisabled -bool true

4. - Copy and paste this in, then hit return:

defaults write com.apple.iTunes DeviceBackupsDisabled -bool false

5. - Open iTunes
6. - Plug in your iPhone (2.0 or 3G) and sync.

Monday 14 July 2008

Latex goodie - How to watermark things in Latex/PDFLatex

I have been having problems since ever when trying to distribute some content to people and keeping track of the NDAs I make them sign. A sound solution (good but not really impossible to break) is to watermark the documents before sending. Then if you detect it in the wrong hands, you can ate least trace who did it.

I had for a long time a code to do this, but the real problem was that this code was actually in TeX, meaning that to make it appear in a PDF I have to convert from dvi to ps and then to pdf. I real pain, plus you finish loosing all the goodies from pdflatex, in term of hyperref.

I found a site[1], and with his instructions I managed to produce my own code to put the copyright watermark in my pdflatex documents, here it is:

\usepackage{graphicx,type1cm,eso-pic,color}

\makeatletter
\AddToShipoutPicture{%
\setlength{\@tempdimb}{.5\paperwidth}%
\setlength{\@tempdimc}{.5\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
\makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.95}%
{\fontsize{3cm}{3cm}\selectfont{Final Version}}}}%
\makebox(-100,-300){\rotatebox{45}{\textcolor[gray]{0.95}%
{\fontsize{2cm}{2cm}\selectfont{Internal Use}}}}
\makebox(-500,-0){\rotatebox{90}{\textcolor[gray]{0.95}%
{\fontsize{0.7cm}{0.7cm}\selectfont{\textcopyright Copyright 2008 - Jean Martina}}}}
}%
}
\makeatother


You should put this code in your preamble, and it will put a watermark in all your pages. You can change the texts and their positions quite easily, just try it.

[1]- http://filoxus.blogspot.com/2008/01/how-to-insert-watermark-in-latex.html

Latex Reference

Well today while surfing to find some things in Latex I discovered the following site:

http://en.wikibooks.org/wiki/LaTeX


This site brings a full reference for people using latex. The good thing is that they have a lot of examples that you can copy and paste and use in your documents.

Saturday 12 July 2008

Ipod Touch V2.0

Well I took a decision today. Upgrade my jailbroken iTouch 1.1.4 to 2.0. The upgrade was smooth. You can do it via the new iTunes by paying $10. Safe and sound. Or you can got in the wild and do an upgrade by other means. If you choose the second options‚ remember:


  • Put the the iPod in recovery mode: Hold the home and power button until the iPod turns off. Then wait until you see your iPod turn on with the apple logo. Let go the power button‚ while still holding the home button. When you see the " Connect to iTunes" logo‚ you are in recovery mode.
  • Find the firmware somewhere
  • plug you iPod in the usb cable and go to iTune. 
  • cancel the automatic firmware install. click the restore button with shift key pressed (mac alt/option)
  • chose your firmware‚ and wait. It takes about 15 minutes to load
That′s it. But remember‚ if you love the Installer‚ there is no jailbreak software available yet‚ although the Dev Team‚ already claimed a jail break in it.

Monday 7 July 2008

The Collection of Computer Science Bibliographies

I received from a friend other day the following link, and it is worth posting:

http://liinwww.ira.uka.de/bibliography/index.html

If you are a CompSci (Computer Scientist), you probably know the pain to arrange bibtex bibliography. This search engine gave me the right bibtex entry every single time I tried.

How to test Qmail+vpopmail for SMTP AUTH

Well, every time I need to check whether an installation of an email server is completely working I need to search google for this bit of information. Sometime is hard to fin exactly what you want. Suprisingly some of the examples don work with qmail.

To generate the AUTH string you need to issue the following command:

perl -MMIME::Base64 -e 'print encode_base64("\000user\@domain.net\000my.password")'

If you are using qmailrocks instalation, perl should have everything to handle this. If should generate an string like this:

AHVzZXJAZG9tYWluLm5ldABteS5wYXNzd29yZA==

To test you qmail instalation do the following:

> telnet newserver.net 587
Trying 123.123.123.1...
Connected to newserver.net.
Escape character is '^]'.
220 smtp.newserver.net ESMTP
ehlo my.machine.net
250-smtp.newserver.net
250-PIPELINING
250-8BITMIME
250-SIZE 0
250 AUTH LOGIN PLAIN
AUTH PLAIN
AHVzZXJAZG9tYWluLm5ldABteS5wYXNzd29yZA==
235 ok, go ahead (#2.0.0)
mail from:
250 ok
rcpt to:
250 ok
data
354 go ahead
Subject: Test

Test
.
250 ok 1215413930 qp 87194
quit
221 smtp.newserver.net
Connection closed by foreign host.

This should deliver the message (if you chnage the fake emails and server name to your reality). If you get any other message, your smtp auth is not working with qmail.

Sunday 6 July 2008

Migrating between two qmail + vpopmail (qmailrocks) servers

This was my problem for today, how to migrate sound and safely from on old system running around 100 domains to a brand new configured qmail system. Both are running with the configuration suggested by www.qmailrocks.org and on a FreeBSD machine. So lets go:

  • First things stop the old qmail server to avoid loosing messages. Remember that you need to stop qmail from receiving any messages, and also stopping users from retrieving their email with pop3 or imap. The following commands would do it for you:
qmailctl stop
/usr/local/etc/rc.d/imap.sh stop
/usr/local/etc/rc.d/imaps.sh stop


  • After yo stopped qmail and the pop/imap daemons, you are able to start to transfer the vpopmail contents. Using rsync is a good idea, since that with it you can minimise the downtime, since you can run it in the hot system , before starting. This run is just to sync from the last call to the time you stopped qmail with the commands above. You are running this in your new server and server.xxx.com is you old server.
/usr/local/bin/rsync -avz --delete -e ssh root@server.xxx.com:/home/vpopmail/domains/* /home/vpopmail/domains

  • Luckily after some time rsync will finish running. If not, leave it working while go to change the other bits. In order to make the new machine recognise all the users and domains from the old server, you need to do the following:
import(merge) from the old server /var/qmail/assign
import(merge) from the old server /var/qmail/recipients
import(merge) from the old server /var/qmail/control/rcpthosts
import(merge) from the old server /var/qmail/control/virtualdomains


  • To finish add and delete a fake domain using vpopmail. This will make vpopmail read all the files you merged and reorganise them.
From now on, you just need to test the system to assure you got everythings working. A good idea before changing the DNS system is to configure an email client with the ip address of the new server an try to send and recieve some emails using all possible combinations.

Finally, keep checking the email server for a day. It is almost impossible to make everything work without mistakes.

Thursday 3 July 2008

Creating Multiple Volume .tar.gz files

Well, today I came a cross a problem: I have to backup a 29GB file system to recreate it under the new rules here (I have ReiserFS, and as the guy is jailed for killing his wife, the policy is to convert everything to ext3, since it tends to be unmaintained). My external HDD is formatted in FAT32, for compatibility issues (Use in Mac , Linux and windows machines).

I did some research, and to create multiple tar.gz files, you need to use a combination of FIFO, split and tar. First you need to create a FIFO file (which can be reused in later uses):

mkfifo /tmp/test.fifo

After you can issue the following command line to generate the files:

split -b 200m /tmp/test.fifo /media/UNTITLED/filename.tgz- | tar -czvf /tmp/teste.fifo .

Basically what I am doing is sending the tar output to the FIFO (First In First Out), and then splitting the FIFO in 200MB files.

To recover things from the tar.gz file you just need the following:

cat /media/UNTITLED/filename.tgz-* | tar zxvf -

This should put all the bits back together.

Thursday 29 May 2008

Digging the past of the Internet

This week I came across one very interesting web site. I was listening the TWIT (This week in tech‚ with Leo Laporte and John C Dvorak) and one guy that was invited to the show was the founder of this site. When he told the features‚ I said: " no way‚ some one can index the Internet historically"‚ but yes‚ he did

The site is www.archive.org. It contains a bunch of interesting web site‚ dating from 1996 up today. If you want‚ you can give a try in some of them. I suggest google‚ and microsoft‚ but be afraid to test other things. Even my very old page in geocites is available there.

Wednesday 21 May 2008

Very interesting Security device

Today while listening to "Security Now" podcast, the guys mentioned about Yubikey, and I went out on some google search about it. Look very interesting and promising. The designs they developed is really nice indeed.

From the developers:

"The Yubikey is a new authentication solution, designed for the mass market of web 2.0 applications. The user inserts the YubiKey in any computer with a USB port on any platform or browser – no client software install needed – then press the YubiKey button to generate a one time passcode.

The secret behind the YubiKey is the fact that the little device is actually a USB keyboard. But with only one button and designed to do two things: To generate the user’s unique identity and a one time pass code that only works the very second it’s used. Every time the user presses the button it generates a new pass code."

More information can be found at:

http://www.yubico.com/products/yubikey/

Tuesday 20 May 2008

Costumers tracking

Well after reading the latest news from the times:

http://technology.timesonline.co.uk/tol/news/tech_and_web/article3945496.ece

It raised some concerns to me:

- If they detect were you are, they can correlate this data with the CCTV system, and also the shops can correlate your IMEI with you credit card, and so on. Data minig is really powerfull in this cases.
- If this technology is really deployable, don't hey have to at least inform users? So you can turn off your mobile to avoid being tracked.
- If this technology goes to the wrong hands, what would impede people of selective killing others? Something like Bruce Scnheier's idea on road side bombing triggered with RFID passports.

The thing is that, here in the UK people don't often carry their (RFID) passport arround, but for sure, everybody carry at least one mobile.

Really scaring.

Monday 19 May 2008

iAlertU

Today I installed the iAlertU software in my Macbook. Really nice piece of software and it really works as promised.

It is interesting how they managed to use the sensor that detects movement in the Macbook (to avoid problem with the disk when you move it in hibernation), and made it an alarm detection system.

It integrates smoothly with Leopard and if you have the iRemote, that you can use it as you use your car's alarm, to enable it remotely (around 10ft distance)

The link:
http://www.slappingturtle.com/home/

Sunday 18 May 2008

GPS things

I just changed this week my old sat-nav system that was based on the TOMTOM for smart phones (I Have an E61i) and a bluetooth GPS receiver. Although good for the price‚ I felt the need to move on to something better.

The cons of the above system are that you can not receive calls while navigating‚ (actually you can‚ but it switches to the phone. It is a nice security feature also)‚ your mobile battery is killed within hours‚ and you need always two charges in the car‚ one for the BT GPS module and other to the phone.

After some researching‚ I went to a Garmin Nüvi 300T. Garmins is producing GPS to a varied range of uses since ever‚ and its GPS to the sat-nav market is really good. Even though everybody talks very well about tomtom sat-nav devices‚ about its interface‚ I decided for the Garmin simply because it is broader in coverage and their traffic detection system is truly the best technological solution.

They use a technology called TMC‚ and from their web page:

"FM TMC Traffic
Our FM traffic receivers receive TMC digital information (where available) on traffic and road construction tie-ups. Your compatible Garmin unit uses this information to minimize trip delays.

In most areas, depending on the service provider, TMC traffic broadcasts are continuous — there's no waiting for scheduled traffic news updates or random alerts. Because traffic broadcasts are received via a "silent" FM data channel, you can still listen to music or news programming on your car radio without interference from incoming FM traffic data transmissions."

The good things bout this sat-nav system are that their maps are cheaper and have more coverage than TOMTOM‚ and they use TMC instead of the tie up system TOMTOM makes you pay monthly.

Cool links:
http://www8.garmin.com/traffic/fm/index.jsp
https://buy.garmin.com/shop/shop.do?cID=134&pID=339

Using SVN on a mac in graphical interface

I found this software that seems to work graet to what I normally do:

"SvnX is an open source GUI for most features of the svn client binary.


It allows you to browse your working copies, spot changes and operate on them but also to browse logs and revisions of your repositories !"

http://www.lachoseinteractive.net/en/community/subversion/svnx/features/

How I (apparently) solved my Macbook wifi problem

Well, going on my mac odyssey, I decide to go for extreme things to solve what apple didn' t. After some research (again, I spent more 5 hours in this), I realised that most people complain of this after Mac OS updates, so I took the DVDs that cam with my Crapbook, and formatted it. I started from scratch to see what was going on

Well apparently the problem solved, but I am now afraid of applying any update that comes from Apple. The Other thing I also realised is that you should never save your wifi connection data in the airport configuration. The best thing is to type every time the password to join the network. It is working on 9 of 10 time I connect now.

The problem I had was basically the macbook dropping more that 60% of the packets when pinging my wifi router on a distance of 30cm.

Mac = Crap

Well, lots of people will see this post and get outraged, but it is sadly true. I will explain my impressions and show what happened to me.

First, I saw lots of people migrating to a Mac, because it is a Unix, good hardware, blah,blah blah. Then I decided to give a try. I bought a Macbook, and my problems started.

The macbook worked really OK for 2 days (yes, 2 days = 48 hours), than it started to have problems with my wifi connection at home. The important detail is that I have other 5 equipments running smoothly in the AP, and the AP is top of range which cost me £140, that is much more than an airport extreme.

I then plugged it on the cable and started an arduous search for solutions. They ranged from software trick up to philosophical thins.

The result was, that after two weeks fighting, I took my macbook to the apple store here in Cambridge. They promptly said me that I would have to change my airport card, and that this usually solves the issue. The things is that after 5 days without the computer it came back with the exact same problem. They also confessed that this is a known issue and that they don't have a solution yet. Probably I will have to way for an OS update to fix this.

What made me really sick with apple is that this problem is recurrent, and I saw in forums a lot of people having problems with Macbook and access points. The brands of the APs normally were Linksys (this means cisco), netgear and belkin. This means to me about 40% of the AP market, according to Google trends.

My real deception was that I was expecting something really good from apple, and what I got was just another crappy PC, packed with a fancy OS and plastic. The thing is that no matter what you buy these days, you will get more of the same.

Thursday 15 May 2008

How to delete Access point in the Nokia S60 3rd Series (n93, e61, etc)

If you have the problem that you mobile just tells your out of memory when trying to delete the Access Points configuration, execute the following procedure:

1. go into the built-in mail application (hit the letter icon on the keyboard)
2. get into the mail settings (Options --> E-mail Settings --> Connection Settings)
3. Then select "Incoming e-mail" or "Outgoing e-mail" doesn't really matter which one.
4. Then scroll down to the "Access point to use" field and select that
5. Select "User defined"
6. Then you have all of your wifi access points listed here, you can, add more, edit existing ones, or delete them. If you want to be able to get to the access point settings via the traditional method, rather than the method listed above, then you need to remove some access points. I don't know how many, but I slimmed my access points down to 18 and I can now get into the access points settings without getting the "out of memory..." error.

Thursday 8 May 2008

Wii - My impressions

Well finally I bought a Nintendo Wii. I just realised that I lost a lot of time. It is a great platform with a lot of different things for you to do. I bought the Wii together with the wii sports, wii play and guitar hero.

Guitar hero is by far the best game I have seen for a long time. Really amazing.

Now I am waiting (for have some money) to buy a a Wii Fit, since that with the wii now I can burn lots of calories, but I think that having the Wii Fit will help me to burn even more.

Another must have for you wii is a modchip. When my Wii arrived I just knew that I would modify it. I waited one week and bought the modchip. Normally my concerns were about voiding the warranty in a brand new console.

The guys behind these modchips are evolving a lot. Now you can buy any modchip (that fits you wii version/model) and solder it in a flat cable, and then later stick this flat cable in the console. You can de-modchip your wii any time you want, but take it out. Then no warranty is voided because you actually haven't modified the wii, you are just using an accessory :)

A tip is have the magic tree-wing screwdriver.

Back to Track and Macbook wifi problems

Well this post is to come back to track with the blog, but also to tell about my new experiences, now with a real macintosh( Not the hackintosh as before).

The first two weeks were horroble, I dicovered an imcompatibility with my WIFI router. After calling apple' s support and draytek (my router brand) support, I solved the problem by myself.

Here are the discoveries:

- The macbook/macos x has a problem of not working very well with short preamble WIFI configurations, so, put your wifi router always in Long preamble. It makes your connection slower, but it with still exist. This means a lot better than before :)

- Change the following parameter on your Macbook

sudo sysctl -w net.inet.tcp.delayed_ack=0

This will make the TCP stack behave differently, making you not waiting for delayed/lost packets that your not that realiable wifi connection will bring.

Well this solved my problems. I hope this post can solve someone else.

Thursday 17 January 2008

UK International Keyboard Layouts

After some developing I am proud to announce that I created a project in SourceForge to have open available and free software to correct the abnormalities of people who own computer bought in the UK (with UK Keyboard) and have to write in other language than English.

With this you can install the new keyboard layout in your machine and start using it like the US International version, being able to have dead-keys and to use accented letters so need to write that email in Portuguese for example.

The address is http://sourceforge.net/projects/ukikl/ andthe windows version is ready to download.

I am planning a Mac Version for the end of this month and a Linux version for the next. I will give update here.

Learning ( how to pick bike locks)

Yesterday I and Giseli went to Clare College to print some stuff she need for the language classes in the afternoon. We arrived and locked our bikes in from of the Old Court. When going out of the college, Giseli's lock was not opening anymore.

Just before leaving home we had used some oil in this lock because it was a bit difficult to open. Apparently the problem just got worst. It was turning the key very well now, but still not opening. We decided to give up, since both were late and left it to solve today.

After arriving again today and expecting for some miracle, Giseli tried the lock again and it was as yesterday. Well we had lunch and then I went to do the dirty job.

First I went to the porters lodge to try to find someone with expertise in cutting locks. The porters are responsible for taking out bikes students leave indefinitely in there.

So they told me the basics:

- Normal (non D-locks) lock can be easily cut with a big scissor to cut metal. You don't need even to do much effort. Very easy job.

- D-locks cannot be cut, but the "hammer strategy" works with them. The porters gave me a big hammer and told to punch on the straight part of the lock. No cheap (less than £50) D-lock will resist to this technique.

In the end, after just 3 tries with the hammer, the lock was open. The porters were right.

This shows why it is so easy to have you bike stolen in Cambridge. The locks that the bike shops sell together with the bikes are really bad, but keep their business in selling bikes... :)

Tuesday 15 January 2008

Back to my duties

Well, after a very good and month long vacation in the sunny-sunny Brazil I am back. I have loads of things to do right now and also to write in the blog.

During this time I was in vacation I wrote some posts ideas in my mobile, but due to the lack of internet connectivity I will be feeding this during this week.