Linux

Installing mahara on Ubuntu

You can now install Mahara using the Synaptic Package Manager. But before you install mahara, you should create a database for mahara in MySQL or PostgreSQL. You will be asked for the database connectivity information during installation.

$ sudo apt-get install mahara

Once installation is complete, go to the mahara installation directory

$ cd /usr/share/mahara

and backup the config file

How can I change the filesize limit for imported files in PhpMyAdmin

The filesize limit is not defined in PhpMyAdmin. The limit is taken from php.ini file. To change this limit, you needed to edit your php.ini file:

$ locate php.ini
$ cd /etc/php5/apache2/
$ sudo cp php.ini php.ini.original  
$ sudo vi php.ini

Change the following two variables in the php.ini file:

upload_max_filesize = 50M
post_max_size = 200M

This would allow file uploads of 50 megabytes. You need to restart apache before these changes can take place. On Ubuntu, the command is

Converting audio and video file formats in Linux

The gold standard of converting audio and video file formats in Linux is FFmpeg. It is a command-line tool capable of recording, converting and streaming audio and video. This article only covers audio and video file format conversion and show how easy it is to use. Installing FFmpeg Chances are that you already have FFmpeg installed on your system. Do the following to check to see, if it is installed.

$ which ffmpeg /usr/bin/ffmpeg

or

Escaping single quotes inside single quotes in bash

In bash, you can use the backslash character ("\") to escape any character. However, if a single quote is inside single quotes, it cannot be escaped with a backslash character. For example:

alias ycd='some_command'

works fine but

alias ycd='command -option 'something''
alias ycd='command -option \'something\''

both of the above return errors.

A trick around this problem is to use both quotes i.e. use double quotes to surround the single quote and single quotes again to surround the single quote.

Setting up virtual lamp stack on microsoft windows

Oracle's VirtualBox is a very solid and stable virtual machine but it isn't the simplest to work with. So I abandoned it a week after I started working with. Recently, I had to return. Why? Vagrant. It is a fantastic virtual machine workflow system. It is amazingly easy to use and deals with VirtualBox for you. On top of that there are many excellent stack available for free download from the Internet. Following is how I setup my LAMP stack.

Creating public/private keys

To create your public / private key on Linux or Mac, which is a unix-based system, following these steps:

  1. Open terminal
  2. type the following command

    ssh-keygen -t rsa

  3. Type enter to ignore passphrase twice

By default you keys will be saved in ~./ssh directory. id_rsa is the private key. id_rsa.pub is the public key. Place a copy of your public key on systems you wish to login through you key pair.

Pages