Netflix on Apple TV from Outside US (No VPN)

February 20, 2012

It’s been a while since I last updated my blog. But here we go again, useful tips and stuff for you guys to enjoy 🙂


In order to watch Netflix on your Apple TV (ATV), you need to make Netflix believe that you are currently in the US, as the service is only available for US and Canada citizen. One way of getting pass this, is to use a Virtual Private Network (VPN). Thus, the downside of using a VPN is the decreasing affect on your internet speed, plus an expensive subscription fee each month.

Instead, DNS is your the answer to get the whole thing up and running in no time. It’s easy to setup, and it doesn’t affect your internet speed.


  1. Visit UnblockUS and create a user (it is free for 7 days).
  2. Power On your Apple TV.
  3. Follow the few steps described here.

You are now ready to watch Netflix on your Apple TV.

Enjoy 🙂


Insert Excel Graph to LaTeX

May 13, 2010

If you make your plots/graphs etc. in Microsoft Excel and wish to insert them into a LaTex document (while still mainting their scalability), this might be the right blog entry for you. So, here’s the trick:

  1. Publish your plot/graph as a .pdf file. You might end up something like this, a plot with a lot of white space around Example.
  2. The trick is to remove all the white space from the pdf file, before inserting your  plot/graph in LaTex. This can be done with the PDF CROPPER tool. Download it from here.
  3. Run the program, drag your pdf file (with white spaces), import your pdf file, and click the “Action” button.  The output is a new pdf file where all the surrounding white space is removed. See the Example
  4. Now, the plot can be inserted into your LaTex document, like all other pictures. Enjoy 🙂

The PDF Cropper tool

Use Google’s “magical blue circle”

November 29, 2009

If you are familiar with Google Maps for mobile, you have properbly used the “My Location” feature. This feature utilizes the cell identification in order to approximate your location information without using a GPS. The outcome will be your approximate location on a map, surrounded by a blue circle showing the inaccuracy of your position. So, if you are interested in how to use this “blue circle” feature on your own Google maps project, you might find this post useful!

Drawing your own magical blue circle

In my current project (master’s thesis), I wanted to show a similar blue circle (1 km radius) surrounding my current location on the map. It seems, that the “blue circle” feature is not available for developers through the the Google maps API, therefore you have to draw the circle yourself. I spend some time looking for others with the same issue, but it was very difficult to find a solution (implementation example) among all the blogs describing the feature and not how to simulate the circle yourself.

Finally, as I was about to give up on the circle I found a working example on my issue. Actually, a GREAT example. So, here you go!

google.load("maps", "2.x");

var map = null;
function initialize() {
 // Google Map API
 if ( GBrowserIsCompatible() ) {
 map = new google.maps.Map2(document.getElementById('map'));
 map.setCenter(new GLatLng(25.036772,121.520269), 10);
 draw(5, 36);
 else {
 alert('Google Map');
 } }

////pan and zoom to fit
var bounds = new GLatLngBounds();
function fit(){

//calling circle drawing function
function draw(givenRad, givenQuality){
 bounds = new GLatLngBounds();
 var centre = map.getCenter()
 drawCircle(centre, givenRad, givenQuality);

///////////////// The Circle ////////////////////
function drawCircle(center, radius, nodes, liColor, liWidth, liOpa, fillColor, fillOpa)
// Esa 2006
 //calculating km/degree
 var latConv = center.distanceFrom(new GLatLng(, center.lng()))/100;
 var lngConv = center.distanceFrom(new GLatLng(, center.lng()+0.1))/100;

 var points = [];
 var step = parseInt(360/nodes)||10;
 for(var i=0; i<=360; i+=step)
 var pint = new GLatLng( + (radius/latConv * Math.cos(i * Math.PI/180)), center.lng() +
 (radius/lngConv * Math.sin(i * Math.PI/180)));
 bounds.extend(pint); //this is for fit function
 fillColor = fillColor||liColor||"#0055ff";
 liWidth = liWidth||2;
 var poly = new GPolygon(points,liColor,liWidth,liOpa,fillColor,fillOpa);

The code sample above is found at this page (ESA), which also provides some other nice examples using the Google maps API here.
Enjoy making your own circles, hope you found this post useful.

Visio figures in LaTeX

November 7, 2009

For my recent project, I needed to draw some diagrams in Microsoft Visio and then import the graphics into my LaTeX document.  It actually took me some while to figure out the most optimal way of doing this. So, if you ever want to include graphics made ind Visio into your LaTeX document, while keeping the wonders of scalable vector graphics, take a look at this :

  1. When you are ready to export your graphics from MS Visio, go to “File” -> “Page Setup”
  2. Select the “Page Size” tab, hit the “Size to fit drawing contents” radio button -> press “Ok” or “Apply”.
  3. Now the canvas fits your content. Go to “File” -> “Publish as PDF or XPS” and save the file. (If you don’t have this menu option, look here.)
  4. Open the PDF file, zoom in and see how nice the content scales in the document. If you have any text in your content, you can actually select and copy the text.
  5. Import the file in LaTeX with ‘\includegraphics[width=1.00\textwidth]{pdfdiagram.pdf}’
  6. Compile you document, and view the nice result 🙂

I have attached an example of a diagram made in MS Visio 2007 and importet into LaTex  Click to see a SAMPLE

If you have any comments to this post, don’t hesitate to drop me a comment.

LaTeX : Nice must-have tools!

October 14, 2009

If you are familiar with LaTex and really like the principles of a GUI based approach to get things done, the following tools might help you along the way. I use them on a daily basis, and couldn’t live without them 🙂

TexnicCenter:  Of course you use TexnicCenter! I won’t post a screenshot.

JabRef: A nice way to manage your references.

JabRef - A tool to manage references.

JabRef - A tool to manage references.

Read the rest of this entry »

Set device time with PyS60

October 8, 2009

Here’s a simple example of how to set the device/system time programmatically with PyS60. Remember, that your Python script shell has to be signed, in order to do so.

I will use a time service from my previous post, which simply returns the current time in UNIX time format (the number of seconds elapsed since January 1, 1970.)  To get a description of how the service is called, please look at my previous post entry JSON on PyS60. In this example, I will only show how you set the device time, according to the UNIX time format.

import e32

#My current time in seconds, but you could use the timeservice
timeInSeconds = 1254991598
#Set system time on the device

As simple as that. I use it for synchronizing the time of the device with the server it communicates with.

Open browser from PyS60

October 4, 2009

So, today I wanted my python script to programmaticaly open the native browser with a specified url. I must admit, that it took me some time to actually find a snippet on the internet, which worked with my Nokia N95 device (3rd Edition).

A quick summary: There is a difference between the way you execute external applications from 1st + 2nd edition and 3’rd edition. (Click for a nice overview of the different editions and devices)

So here you go:

1st and 2nd Edition:

import e32
apprun = 'z:\system\programs\apprun.exe'
browser = 'z:\System\Apps\Browser\</span>'
url = ''
e32.start_exe(apprun, browser + ' "%s"'%url , 1)

3rd Edition:

import e32
browserApp ='BrowserNG.exe'
url = ''
e32.start_exe(browserApp, ' "4 %s"' %url, 1)

In the latter example above ( 3rd edition devices), the number 4 means to “Start/Continue” the browser with the specified url. Furthermore, the space between the ‘ and the number is actually needed, in order for the browser to run. Don’t ask me why 🙂 I have actually found an overview of the parameters here!

If you want to specify an access point to use when opening the browser, you can do the following:

e32.start_exe(browserApp, ' "4 %s 3"' %url, 1)

Where the number 3 above indicates the AP to use.

Start another browser (e.g. Opera)
In addition, if you need to start another browser than the native Nokia browser (e.g. Opera), then Nick Burch has implemented the module which allows you to do so. Please keep in mind, that this module is ONLY for 1st and 2nd edition, but it doesn’t require much efford to extend it for 3rd edition as well.

Here are the links I have used for writing this post: Thisismobility, Nokia forum1, Nokia forum2.

JSON Tools

October 1, 2009

If you are developing, consuming, utilizing or doing anything that has to do with JSON documents, I can strongly recommend a nice add-on for Mozilla Firefox called JSONView. It simply shows your JSON structure in the browser with syntax highlighting, giving a quick and nice overview of the JSON document.

A snippet from a simple JSON structure in the browser with JSONView :

Snippet, showing a JSON document in Firefox with the JSONView add-on.

Snippet, showing a JSON document in Firefox with the JSONView add-on.

Here’s another nice tool which I also use for debugging and validating JSON documents: JSON formatter.

I hope you find the tools as useful as I do 🙂

JSON on PyS60

September 27, 2009


I’m currently working on a project for a Nokia N95 8Gb device, using Python for S60 (PyS60).  My application needs to communicate with a REST service using JSON (JavaScript Object Notation) as the data-interchange format. I found Simplejson, which is an encoder and decoder for Python 2.4+, but NOT for PyS60!

To my big surprise, I found a version of Simplejson ported to PyS60 (made by Aaron), which I found very useful 🙂 Simplejson makes it very easy to encode and decode python objects into JSON and vice versa. Furthermore, the extension makes it very easy to save your entire JSON structure in a file, and read it later on.  For my simple example, I will utilize a basic service which provides the current time in a JSON format (source – Mobile Python).

Try the time service here.

The example below shows the following:

  1. Call the service and deserialize the JSON response to a Python Object/Structure using “loads
  2. Then serialize the Python object into JSON format, and “dump” the result in a file.

Then, its simple enough to load the JSON structure from the file again.

import urllib, simplejson

def write():
  #Paste in the url of the time service
  url = "[url of time service]"

  #Call the service, and decode the JSON into python dict object
  output = simplejson.loads(urllib.urlopen(url).read())
  print output

  #Extract the timestamp value
  value = output['Result']['Timestamp']
  print "The value is: %d" %(value)

  #If you need/want to store the retrieved JSON in a file
  f = open(filename, "w+")
  simplejson.dump(output, f)

Hope that this was a bit useful, leave a comment if you like.

MobileHCI2009 – First post!

September 22, 2009

Hi, and welcome to my new blog.

For my first post, I will simply outline how great the MobileHCI2009 conference in Bonn was.  This was my first (real) conference regarding Mobile HCI, which will be one of the main topics of my future blog posts.

The reason for attending the conference was to get inspiration and ideas for my ongoing master’s thesis.  The main topic of my thesis is “Context aware mobile application/service”, where I mainly focus on using music listening data as an extra sensor information. The music, will hopefully tell us something interesting about a users context. Does it make sense? Well, I am at the early stages of my thesis, so I will guess that the motivation and objectives will change during the project cycle.

So, the first day of the conference started with a workshop called “Context-Aware Mobile Media and Mobile Social Networks”, exactly the topic I’m interested in! Many research projects deal with the phrase Context-awareness in terms of location based services, but very few look into utilizing the users music listening data. A very interesting subject.

Besides all the technical and nerdy stuff, I got to know many cool people working in the same area as me. I will definitely attend next year! 🙂