Pages

Friday, November 30, 2012

OSMAnd Default vs Development

Since I always forget which version is which...

OsmAnd versions at the nightly download page are as follows:
  • default = free version at Market 
  • development = OsmAnd+ version at Market 
The download page is here.

Update: The non-default version is now called -nightly.

Tuesday, November 27, 2012

Adding dependent files in VS 2012

Since my Web Workbench extension is messed up, I'm having issues adding CoffeeScript (.coffee) files with their dependent .js equivalents. The solution seems to be as easy as installing an extension.
As per answers on Stack Overflow (link), VSCommands for Visual Studio 2012 (link) enables managing dependent files through GUI rather than having to manually edit the project file (.csproj) and reload the project in IDE.
The way it works with VSCommands is to select .coffee and .js files, right-click, and select "Group Items" option, then select the parent item. Neat.

Tuesday, November 20, 2012

Managing services in Linux

A great overview of services in Linux, Fedora 18 in particular, is available here.
A nice GUI tool for managing services is called system-config-services and is installed by the package with the same name.

Tuesday, November 13, 2012

Entity Framework Visualizers

EFContrib on CodePlex (link) contains links to project related to Entity Framework. Some of them are DbContext visualizers:
  • Entity Visualizer (link)
  • Entity Visualizers (link)
See this post on how to install a visualizer in Visual Studio.

Monday, November 12, 2012

Google Earth 7 on Fedora 18

On Fedora 18, Google Earth RPM (google-earth-stable_current_x86_64.rpm) installation fails because it conflicts with package filesystem-3.1-2.fc18.x86_64. The reason is "/usr/bin" that is set inside the Google Earth package.
Using
rpm -U --force 
solves this problem. Then, if you get "/lib/ld-lsb.so.3: bad ELF interpreter", this means that 32-bit libraries are missing. Install them with
yum install redhat-lsb.i686 redhat-lsb-graphics.i686 redhat-lsb-printing.i686
However, after this Google Earth crashes. The issue has been reported here.

Edit: Tried with google-earth-stable-7.0.2.8415-0.x86_64. It still clashes with the filesystem package. Forcing installation succeeds but then again Google Earth crashes on start. The reported issue has been updated with the error log.

Sunday, November 11, 2012

Hibernate in Fedora 18

As there is no direct link to Hibernate in current state of Fedora 18, here is a way to easily create a script that will hibernate the system:

sudo /bin/sh -c 'echo disk > /sys/power/state'

Source: https://ask.fedoraproject.org/question/2181/the-final-battle-between-gnome-3-and-hibernating

As if that is not enough, there is an even easier way:

pm-hibernate

This utility is a part of pm-utils package.

Wednesday, November 07, 2012

Ranges in HTML5

Here are some useful texts about Range and Selection objects in HTML5.

  • Introduction to Ranges (link)
And relevant libraries:

Mobile Development with HTML5

Android and HTML5 have in common the fact that they are a free and open platform. And while Android is quickly gaining more market share, I believe HTML5 applications are the way to go in the long run.
Here I will list some resources that can assist in mobile development with HTML5 and related technologies.
  • PhoneGap (link) - open source framework that supports 7 mobile platforms
  • Building Android Apps with HTML, CSS, and JavaScript, book (link)
For getting started with Android and PhoneGap, see this article. To get started using command-line tools, see this page.

To set up PhoneGap, you need to set up the following dependencies first:
  • Java SDK
  • Ant
  • Android SDK
After installing Java SDK and Ant, set JAVA_HOME to paint to JDK installation directory, and ANT_HOME to Ant installation directory. Then add %JAVA_HOME%\bin  and %ANT_HOME%\bin to PATH.
To see more about setting JAVA_HOME, check this article by Oracle (link).

Data Access

As Web SQL standard has become obsolete, the data storage method to use with HTML5 applications is IndexedDb (link).

Monday, November 05, 2012

Setting up a Fedora 18 system

Kernel Panic with VMWare Workstation 9

There is a nasty kernel panic error when running guests in VMWare Workstation 9 on Fedora 18. Here are a few links that help resolve it:

Other occurrences: here, and here.

Threads on VMWare Community: 2103048,  400616.

Patch, vmware 9, kernel 3.5: here

Another issue that appears occasionally is "can not open /dev/vmmon"
As per this suggestion, the solution is to run "sudo service vmware start"

Setting up portable Sublime Text 2

Here are links to Sublime Text 2, some instruction texts, and plugin repositories I used to set up a portable instance of this excellent development editor. I also mixed Windows and Linux version so I'll see how that will work out.

Sublime Text 2 (link)

Dev Build (link)

Nightly Builds (link)

==================================

Data directory

See Basic Concepts (link).

Data directory in portable version contains user data which is located in

Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2

when using installed version.

=====================================

Sublime Package Control

Package Control homepage (link).

I had issues loading the repository via SSL. In that case edit Package Control.sublime-settings, in Data\Packages\Package Control\, and use http instead of https.
=====================================

CoffeeScript

Instructions 1 (link), instructions 2 (link).
Instead of CoffeeScript compiler for Windows (link) install the official CoffeeScript compiler. See this link for more details. In essence, install node.js and then CoffeeScript as a node plugin. This will install a command-line version of the compiler.

In the file User/CoffeeScript.build-settings, Path parameter is pointing to the location of the coffee executable.

Build on Save (link)

Add "coffee" to the file types (Preferences -> Package Settings -> SublimeOnSaveBuild -> Settings-User).
=====================================

TFS

Sublime TFS (link)
Team Foundation Server Power Tools December 2011 (link)

Sunday, November 04, 2012

Mounting ISO to Wine prefix with q4wine

I like using q4wine as a helper tool for Wine. Having multiple prefixes and their administration gets much easier.
One of the things often required for installation of software is mounting ISO files as CD-ROMs to a Wine prefix. The way to do this in q4wine is the following:

When creating a prefix (or editing once it has been created), in the Quick Mount section on the General tab, set the mount point directory. The best is if this is within the prefix directory itself. For example, if the prefix is in "/home/user/wine/x86", the mount point would be "/home/user/wine/x86/cdrom". Create the mount point directory if it does not exist. Use full path directory names, not ~.
In the same section, set the Device (windows drive). The default is the next available letter, which is D:.

Once this is set up, install "fuseiso" package. This turned out to be the easiest way of mounting ISO files as an ordinary user. No root access needed, not even sudo.
Set q4wine to use fuseISO by going to File -> Options -> Quick Mount. Select FuseISO as a Quick Mount profile. Leave the commands at the default settings.

Then go to Tools -> Disc Image Manager and add the .iso file to the list of known images. The images from here will be available in the Mount menu.

After all this is set up, right-click on the prefix, select Mount ISO option, and select the .iso file added to the Disc Image Manager. It will become available to the selected Wine prefix. Then you can simply run any program from that Windows drive, as set in the prefix settings.

Friday, November 02, 2012

QUnit: Testing JavaScript

For getting started with QUnit, a testing framework for JavaScript, see a good introductory article here. This text is part of QUnit documentation. See Intro to Unit Testing (link).
Below are additional useful resources.

  • QUnit Presentation (link)
  • Cookbook (link)
  • API Documentation (link)
  • Article in MSDN Magazine (link)
Besides QUnit, there is Sinon.JS (link), a mock/stub framework. Useful when mocking window functions, for example.