Archive

Archive for the ‘Software Development’ Category

Installing debug FlashPlayer for Firefox on Ubuntu 10.10

July 20th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

  • First install the ‘Adobe Flash Player plug-in’, through the ‘Software Centre’ (alternatively it can be done from the command line if you like)…
  • Download the Debug Flash Player:
$ cd ~/Downloads/
$ wget http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_plugin_debug.tar.gz
  • Extract the files:
$ tar -xzvf flashplayer_10_plugin_debug.tar.gz
  • Copy ‘libflashplayer.so’ to the Flex SDK folder:
$ sudo mv libflashplayer.so /opt/flex/runtimes/libflashplayer.debug.so
  • Update alternatives reference:
$ sudo update-alternatives --install /usr/lib/flashplugin-installer/libflashplayer.so firefox-flashplugin /opt/flex/runtimes/libflashplayer.debug.so 60
  • (optional) Check alternatives reference:
$ update-alternatives --display firefox-flashplugin
firefox-flashplugin - auto mode
  link currently points to /opt/flex/runtimes/libflashplayer.debug.so
/opt/flex/runtimes/libflashplayer.debug.so - priority 60
/usr/lib/flashplugin-installer/libflashplayer.so - priority 50
Current 'best' version is '/opt/flex/runtimes/libflashplayer.debug.so'.
  • Restart Firefox and type ‘about:plugins’ into the address bar to check the plug-in is loaded.
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Install and configure Adobe Flex SDK on Ubuntu 10.10

July 20th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

Requirements

  • The Flex SDK (build 4.5.1.21328 at the time of writing)
  • Java (version 6 at the time of writing)

Installation

  • If it isn’t already installed we need Java. Open up a terminal window and type the following:
$ sudo apt-get install java-package sun-java6-jdk

This may take a few minutes, plus you will have to agree to the license.

  • Download the Flex SDK (see link above) and save it to your Download folder.
$ cd ~/Downloads/
$ wget http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.5/flex_sdk_4.5.1.21328.zip
  • Create a folder to copy the files to:
$ sudo mkdir /opt/flex
  • Unzip the Flex SDK files:
$ cd ~/Downloads/
$ unzip flex_sdk_4.5.1.21328.zip -d flextmp
  • Copy extracted files to final resting place:
$ sudo mv flextmp/* /opt/flex/
  • Add Flex compiler path to “~/.bashrc”:
$ gedit ~/.bashrc

And add the following to the bottom of the file:

export PATH=/opt/flex/bin:$PATH
  • That should be it. To test just call the compiler (after closing any open terminals):
$ mxmlc -help
VN:F [1.9.22_1171]
Rating: 6.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: Flex, Linux, Software Development, Ubuntu Tags:

humyo.com on Ubuntu Server… [update]

March 7th, 2011 No comments

A few months have passed and it is about time I resolved a problem I’m having with WebDAV access to humyo. I found myself reinstalling ubuntu a while back and in my rush to get things up and running I skipped the setup of WebDAV and my humyo mount. However time has come to pull my finger out (as it were!)…

If the truth is known, not much has changed since my original post [here]. However humyo look to have been messing with their security settings and the ‘https’ access is failing… Doh!!

Though not ideal, the best solution is to change the ‘https’ settings to ‘http’. Hopefully this problem will be resolved in the not too distant…

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

humyo.com on Ubuntu Server…

April 12th, 2010 4 comments
humyo.com

humyo.com

Introduction

I have been searching for a secure and reliable online backup service for some time now. There are many providers offering very similar services, and it has always been a balancing act between price, support and security. I have finally opted for one that ticks all the right boxes. I have chosen humyo.com which is located in the UK. As I am using both Windows and Linux systems I needed a service which works well with both. Humyo doesn’t currently have a client application for Linux, however they do support WebDAV which is ideal…

Setup WebDAV

In order to access the storage using WebDAV we need a WebDAV client. I have chosen to use davfs2 due to FUSE support. At the date of this post the latest version of davfs2 is 1.4.1 and installation is very simple.

sudo apt-get install davfs2

However, there are a number of small configuration changes to be made. Again, nothing too complicated. We need to remove the root access limitation and add account credentials. To add credentials first open the following file:

/etc/davfs2/secrets

Then add your account settings:

https://dav.humyo.com    <EMAIL ADDRESS>    "<PASSWORD>"

As Humyo doesn’t support file locking we need to disable it in order to remove the warning every time a file system is mounted. This can be done either on a per-system, per-user level or in a specific configuration file. Consult the mount.davfs manual for information how this can be changed.

man mount.davfs

To disable the file locking, open the davfs2 config file:

/etc/davfs2/davfs2.conf

Change the option:

# use_locks 1

To the following:

use_locks 0

Finally we need to configure the SSL certificate. Execute the following command:

wget -O - "https://support.comodo.com/index.php?_m=downloads&_a=downloadfile&downloaditemid=10" | \
sudo tee /etc/davfs2/certs/addtrust_ab.pem

Update the config file:

/etc/davfs2/davfs2.conf

And add the following line:

servercert /etc/davfs2/certs/addtrust_ab.pem

Mount

We are now ready to create a folder and mount point. I have used a standard path:

sudo mkdir /mnt/humyo

To mount the humyo drive execute the following command:

sudo mount -t davfs https://dav.humyo.com /mnt/humyo/

To allow users to access the mounted folder and remount at boot we need to modify the fstab config file:

/etc/fstab

And add the following line:

https://dav.humyo.com    /mnt/humyo    davfs    user,auto,rw    0    0

If all goes well you should now have access to humyo storage drive…

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)

Parse Boolean value from String…

July 10th, 2009 No comments

One of the small niggles I have with AS3 is the way it parses boolean values from strings. It first tries to convert the string value to a number, then to a boolean (there is a long explanation which I will not go into at this point)… To maintain sanity I have written a very simple function to handle it for me:

static public function parseBoolean(str:String):Boolean
{
    switch(str.toLowerCase())
    {
        // Check for true values
        case "1":
        case "true":
        case "yes":
        return true;

        // Check for false values
        case "0":
        case "false":
        case "no":
        return false;

        // If all else fails cast string
        default:
        return Boolean(str);
    }
}
VN:F [1.9.22_1171]
Rating: 6.5/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

String.IsNullOrEmpty

May 15th, 2009 No comments

Having a .NET background I frequently used the String.IsNullOrEmpty() method. However after starting with ActionScript I have noticed that this (and a few other) functionalities are missing. So here is my version:

public static function IsNullOrEmpty(value:String):Boolean
{
    // Check if string is 'empty'
    if (value == "")
    {
        return true;
    }

    // Check if string is 'null'
    if (value == null)
    {
        return true;
    }
 
    // Not 'empty' or 'null', it must be ok!
    return false;
}
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)