Author Archive

New Version of Furius iConverter Available

A new version of Furius iConverter is now available. Version 0.1.1.0 has some bug fixes (thanks to Sid32 for notifying me of these) and I’ve also added a new preset for iPod Nano’s. Head on over the the Project page to grab yourself a copy of the latest version.

I’ve also been toying with the idea of adding H264 codec support to the program through a simple check box option and a drop down menu to select a quality preset. I would love to hear people’s thoughts on this. I initially wrote this program to be a very simple and intuitive conversion tool and, as such, I don’t wan’t to make it more than it needs to be. I think I can add this option without making anything to complicated or confusing to basic users just wanting to convert videos.

What does everyone think? Is this a worthwhile addition and what would other people like to see in this tool?

Thanks.

  • Share/Bookmark

How To Add Videos to an iPod Classic (Video) in Ubuntu 10.04

Here are the easy steps to add videos to an iPod Classic with Ubuntu 10.04

First convert your videos using Furius iConverter ;)

Then, install gtkpod.

Open a terminal and type:

sudo apt-get install gtkpod-aac

Enter your password and select Y (Yes) to install with required dependencies

Plug your iPod into your computer using the USB cable

Wait for your iPod to mount

Click CANCEL if you are asked for a default application to open your device with

Go to APPLICATIONS- SOUND & VIDEO and click ‘gtkpod iPod Manager’

gtkpod

gtkpod

Select your iPod device from the Playlists treeview on the left (mine is Dean’s iPod)

gtkpod showing Dean's iPod

gtkpod showing Dean's iPod

Select Add Files

Add Files

Add Files

Select the Videos you wish to add

Select Files

Select Files

Now click Save Changes. gtkpod will now update your iPod library. However, you will notice that your iPod will now start ’syncing’; do not disconnect before it has finished this or you may loose data.

You can now close gtkpod and ‘Safely Remove Drive’ by right clicking on the iPod icon on your desktop.

Enjoy your videos on the go!

  • Share/Bookmark

How to Perform a Scheduled Virus Scan on Ubuntu 10.04 with Gnome-Schedule and ClamAV

This post will help you set up scheduled virus scan on your Ubuntu box using Gnome-schedule and ClamAV.

While it is true that the direct threat of Viruses on Linux is (at present) limited, many users dual boot with Windows, share networks with Windows and other such things, and here our ’safe’ Linux box can be a carrier. Of course, with the increasing popularity of Linux on the desktop, I’m sure it’s only a matter of time before more and more virus start targeting our beloved Linux systems. As such, it is better to be safe than sorry…

To protect our Ubuntu box we shall be using the excellent ClamAv for our virus scanning and the equally excellent Gnome-schedule to automate the process.

Firstly open up a terminal and install our required software…

sudo apt-get install clamav clamav-docs libclamunrar6
sudo apt-get install gnome-schedule

Okay, that everything installed. Let’s set everything up…

You should now have a new launcher under APPLICATIONS-SYSTEM TOOLS called Scheduled tasks.

Start Gnome Schedule and Click New and select the default option of ‘A task that launches recurrently’.

We are now going a task to scan our Home directory recursively every day at 12:00 AM and write a log file.

In the Description field type (or whatever you see fit):

Daily ClamAV Scan

Set the Time & Date option to Basic and select:

Every day

Set the Command Field to:

clamscan -r -i -l ClamAV-log.txt /home/harris/

(clamscan runs a ClamAV scan, -r sets the scan as recursive, -i only print infected files, -l ClamAV-log.txt creates a log file with that name, and /home/harris/ is the target of our scan.)

Your new task should look like this:

Gnome-Schedule

Gnome-Schedule set-up to run ClamAV

Click OK to accept the task and you should see your newly scheduled task in the schedulers list of tasks.

Now you can Quit the scheduler. This will not stop the system scheduling.

Things to be aware of!

You will need to keep your virus definitions up to date using the the following command:

sudo freshclam

ClamAV can only read files that the user running it can read. If you want to check all files on the system you must use sudo:

sudo clamscan -r -i /

ClamAV is an excellent tool with many command parameters. To see what other options you can add have a look at the man pages:

man clamscan

Finally, if you wish to add a GUI to ClamAV take a look at
How to Install Clam AntiVirus with GTK frontend GUI

  • Share/Bookmark

Marcus Furius Development has a new Logo

I would like to thank my wonderful girlfriend, Emily Bell (info@emilybelldesign.co.uk), for her work creating a wonderful new logo. It is more than I could have hoped for! If you like it, please let me have your comments so I can pass them on to her.

Thanks hunny!

  • Share/Bookmark

Simple Conversion of All Videos to iPod / iPhone Format for Ubuntu and Linux

Using a simple graphical user interface, Furius iConverter, is a tool for Ubuntu and other Linux distributions to easily convert any video format to iPod / iPhone compatible format effortlessly.

Head on over to the Furius iConverter project page and grab yourself a copy.

This is still an early beta release, so if you would like to contribute, please post your comments, suggestions and bugs on the project page and help Furius iConverter get better and better.

  • Share/Bookmark

Joining the ‘Mono is a disease’ debate

I’ve recently read a couple of arguments regarding Mono and it’s effect on Linux. These are interesting debates and can be found here and here. I’ve decided to posy my 10 cents worth!

My most popular application is Furius ISO Mount which up until version 0.11.0.0  was written in C# using Mono. Prior to this application I had never done any development for Linux and all my previous programming work had been corporate driven Windows development. When I came to Linux, I thought it was great that my existing skill set was immediately transferable to Linux and I could start hacking some code together with limited Linux knowledge. I think this is an important point to take into consideration. I understand the political arguments, however, I feel that any technology that brings more developer to work with Linux is only a good thing.

There is often an argument that Cannabis is a gateway drug, while not as dangerous as other drugs, it can lead to exposure to the harder drugs; Mono was my gateway drug! Programming using Mono gave me exposure to Linux development and led me on to trying other languages, such as Python.

Furius ISO Mount was completely rewritten in Python for version 0.11.0.0 but if it wasn’t for Mono I would have never written the application and possibly never programmed for Linux. This reason. for one, is why I think the Mono project is a worthwhile endeavour and I hope it introduces more Windows programmers to developing for Linux.

  • Share/Bookmark

Furius ISO Mount Version 0.11.2.1 Released

A new version of Furius ISO Mount has been released.

Added support for the ISO-13346 “UDF” file system specification when using the loop mount option. This should have been included in version 0.11.2.0 but was omitted in error.

  • Share/Bookmark

Vala Programming Language Recursive Benchmark using Fibonacci

In a previous post I took a look at benchmarking the performance of various programming languages using recursive Fibonacci. Today I decided to take a look at Vala.

Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.

First, of course, I had to install Vala and a suitable IDE. To do this on Ubuntu 10.04, I followed the instructions found here.

Here is the code and the benchmark result:

public class Main
{

  public static int Fibonacci(int n)
  {
    if (n < 2)
    {
      return n;
    }
    else
    {
      return Fibonacci(n - 1) + Fibonacci(n - 2);
    }
  }

  public static int main (string[] args)
  {
    var timer = new Timer();
    timer.start();
    for (int  i = 0; i < 36; i++)
    {
      stdout.printf("n=%d => %d\n", i, Fibonacci(i));
    }
    timer.stop();
    stdout.printf("Time elapsed = %f seconds\n", timer.elapsed());
    return 0;
  }
}

Results: Time elapsed = 0.640000 seconds

As you can see, compared to the recursive python benchmark (Time elapsed =  14.2846501707 seconds), this is very fast.

Vala looks like a very interesting language and is one I’ll be watching the progress of closely.

Please note: I’m not a C coder and have never programmed in either C or Vala before, as such, my timing routine is probably poorly implemented at best! If anyone knows how I should have done this, I’d love to hear from you.

Many thanks to frederik (see comments below) for showing me a better way of determining elapsed time!

  • Share/Bookmark

Surf Anonymously with Ubuntu 10.04, Tor, Privoxy and Firefox

We all know that Big Brother is watching, but he doesn’t need to know what websites you’ve been visiting! Using Privoxy, a web proxy program, Tor, a software project that helps you defend against traffic analysis, and a firefox plugin called TorButton, you can browse the web in anonymous safety. Here is some an explanation of the technology from the Tor website:

Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location.

Please note: Because your communications are bounced around a global network, your surfing will take a slight performance hit. Because of this we are using TorButton to enable us to quickly turn this feature on and off.

Installation

First let’s install Tor and Privoxy (Ensure the restricted repositories are enabled)

sudo echo ‘deb http://deb.torproject.org/torproject.org lucid main’ | sudo tee -a /etc/apt/sources.list && gpg –keyserver keys.gnupg.net –recv 886DDD89 && gpg –export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add – && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo privoxy

Next, we need to configure Privoxy. Open /etc/privoxy/config in your favourite text editor.

sudo gedit /etc/privoxy/config

We need to find this line: listen-address localhost:8118
In my config file it was line number 741.

Beneath this we need to add the following text (including the period):

forward-socks4a / localhost:9050 .

Your config file should look like this…

/etc/privoxy/config

/etc/privoxy/config

Save and exit.

Now we need to restart Tor and Privoxy

sudo /etc/init.d/tor restart
sudo /etc/init.d/privoxy restart

Now we need to start firefox and install the TorButton plugin.

Navigate firefox to https://addons.mozilla.org/en-US/firefox/addon/2275 and click ‘Add to Firefox’

Restart firefox.

In the bottom right hand corner of firefox you will now have a button titles ‘Tor Disabled’, this can be clicked to enable and disable Tor. You can test your new found anonymity by visiting http://ip-address.domaintools.com/ (see screenshots below).

Tor Disabled

Tor Disabled

Tor Disabled

Tor Enabled

Tor Enabled

Tor Enabled

Happy anonymous surfing!

  • Share/Bookmark

Super fast Fibonacci number generator for Python and Ruby

Some time ago at work my colleagues and I were discussing the performance of various programming languages (Python, C++, C#, VBA, JavaScript, Java, VB.Net, Ruby) and which one was the fastest. I therefore started writing recursive Fibonacci methods for each language and timing their execution (anything to get out of doing real work!). This then led to looking into faster methods of generating the Fibonacci sequence. Below are three different method for generating the sequence; recursive (slow), matrix (fast), and pure maths (super fast). Though I have yet to come across a need to generate a Fibonacci number in one of my applications, I thought I would share this as it may be of interest to some of you out there.

PYTHON Recursive (slow)

import time

def fibonacci(n):
    if n < 2:
     return n
    else:
     return fibonacci(n-1) + fibonacci(n-2)

start = time.clock()
for i in range(36):
    print "n=%d => %d" % (i, fibonacci(i))
end = time.clock()
print "Time elapsed = ", end - start, "seconds"

Results: Time elapsed =  14.2846501707 seconds

Matrix (fast) Note: This requires the python-numpy module (Ubuntu users can apt-get install python-numpy)

import time
import numpy

fibonacci_matrix = numpy.matrix([[1,1],[1,0]])
def fibonacci(n):
    return (fibonacci_matrix**(n-1)) [0,0]

start = time.clock()
for i in range(36):
    print "n=%d => %d" % (i, fibonacci(i))
end = time.clock()
print "Time elapsed = ", end - start, "seconds"

Results: Time elapsed =  0.0408389234748 seconds

Pure Maths (super fast)

import time
from math import sqrt

def fibonacci(n):
    root5 = sqrt(5)
    phi = 0.5 + root5/2
    return int(0.5 + phi**n/root5)

start = time.clock()
for i in range(36):
    print "n=%d => %d" % (i, fibonacci(i))
end = time.clock()
print "Time elapsed = ", end - start, "seconds"

Results: Time elapsed =  0.00034817521541 seconds

RUBY Recursive

def fibonacci(n)
    if n < 2
        n
    else
        fibonacci(n-1) + fibonacci(n-2)
    end
end

start_time = Time.now
36.times do |i|
    puts "n=#{i} => #{fibonacci(i)}"
end
end_time = Time.now
puts "Time elapsed = #{end_time - start_time} seconds"

Matrix

require 'matrix'

FIBONACCI_MATRIX = Matrix[[1,1],[1,0]]
def fibonacci(n)
 (FIBONACCI_MATRIX**(n-1)) [0,0]
end

start_time = Time.now
36.times do |j|
 puts "n=#{j} => #{fibonacci(j)}"
end
end_time = Time.now
puts "Time elapsed = #{end_time - start_time} seconds"

Pure Maths

def fibonacci(n)
 root5 = Math.sqrt(5)
 phi = 0.5 + root5/2
 Integer(0.5 + phi**n/root5)
end

start_time = Time.now
36.times do |j|
 puts "n=#{j} => #{fibonacci(j)}"
end
end_time = Time.now
puts "Time elapsed = #{end_time - start_time} seconds"

#########################################

For anyone who wishes to run some language benchmarks themselves (if you are really bored!!), here is the recursive sequence for other languages.

PHP

function fibonacci($n) {
    if ($n < 2) {
        return $n;
    }
    else {
        return fibonacci($n - 1) + fibonacci($n - 2);
    }
}

$start_time = microtime(true);
for ($i = 0; $i < 36; $i++) {
    $fib = fibonacci($i);
    print "n=$i =>; $fibn";
}

$end_time = microtime(true);
$diff_seconds  = $end_time - $start_time;
print "Time elapsed = $diff_seconds seconds";

VBA

Private Function Fibonacci(ByVal n As Integer) As Long
    If n < 2 Then
        Fibonacci = n
    Else
        Fibonacci = Fibonacci(n - 1) + Fibonacci(n - 2)
    End If
End Function

Sub Main()
    Dim StartTime As Date
    Dim EndTime As Date

    StartTime = Time
    For Index = 0 To 35
        Debug.Print "n=" & Index & " => " & Fibonacci(Index)
    Next
    EndTime = Time

    Debug.Print "Time elapsed = " & (EndTime - StartTime) * 86400
End Sub

C#

static int Fibonacci(int n)
    {
        if (n < 2)
        {
            return n;
        }
        else
        {
            return Fibonacci(n - 1) + Fibonacci(n - 2);
        }
    }

    static void Main(string[] args)
    {
        Stopwatch stopwatch = new Stopwatch();
        stopwatch.Start();
        for (int i = 0; i < 36; i++)
        {
            Console.WriteLine("n={0} => {1}", i, Fibonacci(i));
        }
        stopwatch.Stop();
        TimeSpan excecutionTime = stopwatch.Elapsed;
        Console.WriteLine("Time elapsed = {0:00}.{1:00} Seconds",
                excecutionTime.Seconds, excecutionTime.Milliseconds / 10);
        Console.ReadLine();
    }

JAVA

public static void main(String[] args) {
 long start = System.currentTimeMillis( );
 for (int i = 0; i < 36; i++)
        {
      System.out.println("n=" + i + " => " + Fibonacci(i));
        }
 long end = System.currentTimeMillis( );
 double deltaT = end-start;
 System.out.println("Time elapsed = " + deltaT/1000 + " seconds.");
 try {
  System.in.read( );
 } catch (IOException e) {
  e.printStackTrace();
 }
}

public static int Fibonacci(int n) {
        if (n < 2)
        {
            return n;
        }
        else
        {
            return Fibonacci(n - 1) + Fibonacci(n - 2);
        }
}

Enjoy!

  • Share/Bookmark
Return top