Author Archive

git: How to view all files of a commit

This entry is part 1 of 7 in the series git: useful HOWTOs
git show --name-only [commit]

here.com – Cool 3D maps

I just visited here.com to check online Nokia’s maps. I got impressed by the 3D view they offer for some cities.

here.com

GCC — 64bits addressing: function returns 32bits pointer

Today, it was the second time I stepped on an interesting problem with GCC  (well, it is actually a behavior). I created a function which returns a void* in a .c file. This C file was then compiled and added in a library (.a). When I used this function in an application, I was getting a void* pointer were the 32 most significant bits were either zeroed (0x00000000...) or set to 1 (0xFFFFFFFF...). My application is 64bit!!

For example, the debug prints I added would return:

[lib] allocated 0x7f756d6fa048
[app] allocated 0x6d6fa048

where you can see the “conversion”.

What was the problem? After some time of debugging, I realized that I had forgotten to include the aforementioned function in the corresponding header file :|. So, although GCC could find the function in the library I was linking the application to, I guess it was assuming a wrong return value/header for that function.

The conclusion: Be more careful 😉

PS. I am using the following version of GCC:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' 
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ 
--prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror 
--with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Skype – Your payment is rejected.. your subscription is terminated

I used to have the “Unlimited Europe” subscription with Skype, so that I can call to landlines in Europe for free. I believe I have had this subscription for the last 3+ years.

Some days ago my monthly payment for the unlimited Europe was rejected due to some issues with my card, so I received two emails:

  • Your payment was rejected.
  • Your subscription is terminated and will stop in 3 days.

Can you imagine that? They did not let me fix the issue, they just canceled my subscription. Their e-mail is entitled:

Your subscription has been successfully cancelled

Thank you! I am very proud I successfully managed to cancel it..

Today, with my credit card working, I tried to reissue the payment and get my subscription back…

Guess what? The lady at customer support let me know it is IMPOSSIBLE and that I have to buy the subscription again, 1.5 euros per month more expensive.

This is how you treat a 3 years+ loyal customer 🙂

Check if your Linkedin password was stolen

As you all probably heard, there were some stolen passwords from Linkedin this morning (announcement). A simple way to check if your password belongs to the ones stolen is by using the following script:

#!/bin/bash                                                                                        
 
if [ ! -f 'combo_not.txt' ]
then
    if [ ! -f 'combo_not.zip' ]
    then
        echo "Downloading the list of sha1s"
        wget http://wordpress.phobostechnology.com/wp-content/uploads/2012/06/combo_not.zip
    fi
    echo "Unziping"
    unzip combo_not.zip
fi
 
mine=$(echo -n "$1" | sha1sum | cut -d' ' -f1);
mine0="00000"${mine:5};
echo "checking "$mine
echo " and     "$mine0
echo "===found:"
grep -e $mine -e $mine0 combo_not.txt

Do chmod +x on the script and then run it placing a space in front, so that the command does not appear in the history of commands.
For example:

 $  ./check.sh 123456
checking 7c4a8d09ca3762af61e59520943dc26494f8941b
 and     00000d09ca3762af61e59520943dc26494f8941b
===found:
00000d09ca3762af61e59520943dc26494f8941b

PS. Yes, someone is using the password 123456!

Nokia N9 – Access the Quick Launch Menu


In order to access the Quick Launch Bar you need to swipe up and hold any application for around 1 second.

A very nice application for modifying the Quick Launch Menu is the application called Shortcuts. It allows you to change the entries and the sequence of the menu.

Nokia N9 – Add your Google Calendar account

In order to add your Google calendar account to Nokia N9 you have two alternatives. The advantage of the first is that you can select more than one of your calendars to be synchronized, while with the second you get better synchronization (at least according to my personal experience).

Alternative 1

  1. Go to Accounts -> Add accounts -> CalDAV
  2. In the Username field, enter your full Google Account or Google Apps email address.
  3. In the Password field, enter your Google Account or Google Apps password.
  4. In the Server field, enter google.com

Only your default calendar is synchronized by default. If you want to synchronize more calendars of your account go here and select the ones you want.

Source.

Alternative 2

  1. Go to Accounts -> Add accounts -> Mail for Exchange
  2. Enter your email address.
  3. Enter your username (it is your email address).
  4. Enter your password.
  5. Leave domain field empty.
  6. Press the Manual Setup. Select what you want to synchronize (Calendar, Mail, Contacts). Use “m.google.com” as the server address and 443 as the port.

Nokia N9 – How to install the terminal application

If you want to get access to the terminal application, you can simply do the following: go to Settings -> Security -> Developer mode and enable it. The terminal will be automatically installed. Enjoy 🙂