Wednesday, January 2, 2013

Mobile browser user agents

Had a quick go at seeing what user agent is reported from different mobile devices and browser combinations:

Android (Gingerbread) stock browser:


134.171.xxx.xxx - - [02/Jan/2013:17:22:53 +0100] "GET /wdb/html/status_btn.gif HTTP/1.1" 200 1588 "http://archive.eso.org/wdb/wdb/eso/fors2/form" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"

Android Opera Mobile:

134.171.xxx.xxx - - [02/Jan/2013:17:21:38 +0100] "GET /wdb/wdb/eso/fors2/form HTTP/1.1" 200 28130 "-" "Opera/9.80 (X11; Linux zbov) Presto/2.11.355 Version/12.10"

Android Firefox:

134.171.xxx.xxx - - [02/Jan/2013:17:22:17 +0100] "GET /wdb/wdb/eso/fors2/form HTTP/1.1" 200 28130 "http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html" "Mozilla/5.0 (Android; Mobile; rv:17.0) Gecko/17.0 Firefox/17.0"

and for comparison, this is the stock iPhone4 browser:

134.171.xxx.xxx - - [02/Jan/2013:17:25:15 +0100] "GET /wdb/wdb/eso/fors2/form HTTP/1.1" 200 28130 "http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A523"

Friday, December 14, 2012

Getting a shell on Galaxy SII

First enable the USB debugging in (under Gingerbread, ICS or later may differ)

> Settings > Application > Development >

Then create this if using OpenSuSE (not required for Ubuntu 12.04)


# cat /etc/udev/rules.d/53-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"

note the vendor id is the one from Samsung (see http://developer.android.com/tools/device.html#VendorIds).

Now under OpenSuSE 11.x restart udev


# /etc/init.d/boot.udev restart

then plug the usb cable in the phone and as regular user you should see the device now



~/android-sdk-linux/platform-tools> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
304D19AFD0235C8E device

and start the sehll

~/android-sdk-linux/platform-tools> adb -d shell
$ pwd
/

Wednesday, April 11, 2012

Middle Road Lodge

Hello

today I am adding a new feature to this blog: bookings overview for rooms in the Middle Road Lodge! You can see it on the right pane of this blog.

If you read this you probably know what this is about, else you don't need to know :-)

So, for those who are in the know, I hope you find it useful to plan/request a suitable lodging. Red events indicate bookings for the double guestroom, orange for the single one. You can click on any booking to see further details (press the escape key to undo), and also check out on the top right arrow: there is a drop down menu from which you can select separate calendar/booking for the two different available rooms, e.g. double (red) and single (orange).

I will keep these calendars updated from now on.

The Lodge Keeper





Thursday, January 5, 2012

Setting up Android development environment

So here are my notes on the subject (using a Linux platfrom).

First install the JDK from Oracle (I had to remove previous rpm from SUN RIP to achieve this):

# rpm -e jdk-1.6.0_30-fcs.i586
# rpm -ivh jdk-6u30-linux-i586.rpm

and make it default system wide:


# update-alternatives --config java

There are 2 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/lib/jvm/jre-1.6.0-sun/bin/java
*+        2    /usr/lib/jvm/jre-1.6.0-openjdk/bin/java

Press enter to keep the default[*], or type selection number: 1
Using '/usr/lib/jvm/jre-1.6.0-sun/bin/java' to provide 'java'.
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

Then install the current Android SDK, so that it ends up in  ~/android-sdk-linux and launch it with

$ ./android-sdk-linux/tools/android

Then check on all boxes from the API 14 (ICS) bundle and Tools folder, it will download a bunch of stuff.

Then from the Tools -> Manage AVD menu create a virtual device.

Now we need the Eclipse IDE, I downloaded eclipse-java-indigo-SR1-linux-gtk.tar.gz, just extract it to suitable location and run

$ ./eclipse/eclipse

then install the Google ADT plugin as per official docs.



Tuesday, January 3, 2012

Adding Amazon wishlist

So I have found instructions on how to add a widget to this blog which displays my Amazon wish-list. The reference site to create the Javascript snippet is

https://widgets.amazon.de/Amazon-Wishlist-Widget/

once you have that, go to the blog layout and add a widget (type html/javascript) to the desired position. Enter the snippet in the browser pop-up window. Done.

Friday, May 7, 2010

digging hard links

A couple of tips about hardlinks: to find all hard links in a specific namespace use something like this:

$ find -type f -links +1

this because hard links have, by definition, more than one link pointing to them, as you can see with ls or stat on one of them.

Another useful tip: to know about any hard link which is related to a specified file use something like:
$ find /home -xdev -samefile foo
this will print out all files which are hardlinked to foo. Remember that hard links have the same inode number which can be seen with
$ ls -li foo

once you know the inode number, you can also search for hard links with something like

$ find /home -xdev -inum 7465209
Have fun!

Thursday, January 14, 2010

How to run ChromeOS under VMware

Starting from this announcement

http://www.unixmen.com/news-today/706-chromium-os-zero-released-

I wanted the try out ChromeOS but under VMware and have a look at it. The first thing is to convert the downloaded raw image to VMWare disk image format:

$ qemu-img convert -f raw ChromeOS-Zero.img -O vmdk ChromeOS-Zero.vmdk

Then start VMware player and create a new virtual machine, but select "Custom". At some point during the process, it will ask you to select a disk. Choose to use an existing virtual disk, and point the installer tothe file created above.

This is the only trick you need to complete the virtual machine creation. Now to see what is all this ChromeOS fuss about ...