Sunday, September 21, 2014

Listen to music without leaving terminal

GNU/Linux is all about terminal, you can do almost everything without leaving terminal prompt. Here's an awesome way of listening to music without the support of a GUI.

Install xmms2, previously it was xmms which is a gui light weight mp3 player. Now it's totally cli based.

# apt-get install xmms2

Find your music and add to the playlist

# xmms2 add track1.mp3

Add as much as you want and list what you have added

# xmms2 list

Now it's time to play.

# xmms2 play

This will run as background process so if you want to stop, execute

# xmms2 stop

If you want to remove a song from the playlist

# xmms2 remove <playlist number>
hint: list the playlist to see the exact number

use manual pages for more commands and operations.

# man xmms2

enjoy !!!

Tuesday, June 17, 2014

Universal Downloader

Do you face difficulties while downloading media files which can stream online ? well, I had the same problem for sometime, till I discover this awesome tool to do that task. it's JDownloader.



From the description available in their official site, this tool can download any video from almost all the streaming sites. No matter how big that is, but it will fail due to site restrictions.

I tried with sockshare.com, firedrive.com [putlocker.com] and dailymotion as well. It was able to download the file without anyproblem and you can also pause the download and continue later. ( don't worry about captcha, it will ask your help to proceed )

The link I have provided is for JDownloader2, which is a beta version. And the good news is, JDownloader comes with GNU GPLv3 license, and it is available for any platform (written in JAVA).

Wednesday, May 28, 2014

Handbrake video converter

Without using proprietary softwares how can you convert a video to another format ?, I have found a handy tool for doing it very well. According to the official site, it is available for Linux, Windows and Mac. Since I don't have Windows or Mac with me, I had to test it with Linux.
If you are using Debian Wheezy, you can directly use repositories. I tried compiling HandBrake, but it requires many dependencies, which is a pain to resolve sometimes.

http://handbrake.fr/

Simply add this line to your sources list and update.

deb http://www.deb-multimedia.org wheezy main non-free

Then run, apt-get update && apt-get install handbrake handbrake-gtk




Note: In version 0.9.9, wmv video conversion is not available.

Wednesday, April 9, 2014

Journey to a plateau

After a several discussions, me and my friends were decided to have a journey to the upcountry. If you search about plateaus of Sri Lanka, the very first name you will get is Horton Plains. It is a popular plateau among tourists and a paradise for naturalists.
It was a clear morning, without the mist, rain and strong wind, and we arrived to the entrance of the national park around 7.30 AM.

  

 Horton Plains is popular for a few things, "world's end", "Baker's falls", large plain and bio diversity. When the British period, they were renamed this plateau to Horton Plains which was originally named as "Maha Eliya Thenna". According to some ancient books, this area was forbidden and no one ever lived close to here, and the reason remains a mystery. Furthermore, if you search the time before the written history, there are some mythical stories about this place, which reminds me, that every myth has a hidden real story.  
However, our first destination was the "world's end". I cannot find a good reason for that name with the clear weather, but if there are mist, then someone can be mistakenly identified it as the world's end if they have no idea about the globe. 
I was very lucky to capture the bottom of this sheer precipice, with my amateur photography skills.


Baker's falls is one of the famous waterfall in Sri Lanka which is located in Horton Plains. It is not huge compared to other popular waterfalls, but eye catch-able .



While I was gratifying my eyes from the beauty of the plateau, I have got to know some major threats for this environment. Mainly the behavior of tourists and alien species such as Ulex europaeus and Brackens. Fortunately, there are some programs for reduce these threats, but I am not sure how much effective they are.

If you like to see more photographs, please visit my flickr set.

https://www.flickr.com/photos/122401983@N05/sets/72157643496113774/

 

Sunday, March 30, 2014

Can we trust skype ?

Recently, I have read about surveillance via social networks and how unauthorized persons and organizations, spying on the people. They have used proprietary softwares for such activity. Skype is the most popular Voice-over-IP program, and it is really helpful to make virtual conversations. It is used by not only people, but the governments as well. It's been more than 10 years since they announced the first release of skype and now, almost all the people are addicted to use skype for internet calls, even they provide less service than they used to be.
Skype comes with freemium license, which is basically free but advanced features are available for money. However, it is true, that we cannot guarantee our privacy if we use proprietary program like Skype. We can't be sure who is listening in. Why ? because the code isn't open and we don't know what exactly happening inside, where it connects and what encryption it provides.
As an open source enthusiast, I explored  about alternatives for skype which can be trusted. And I was lucky to find a super tool for VoIP, which is absolutely open source and distributed under LGPL license. It is jitsi. It is available for all the platforms and in case you may use the source to build it into your platform.

Download jitsi


Finally, I need to mention that, jitsi isn't popular like skype. Therefore, you cannot completely stop using skype. So, I hope to see more users on jitsi (including my friends and clients) near future.

Sunday, February 9, 2014

Private MediaWiki

MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. The default settings in MediaWiki, allows any user to view/edit its content. MediaWiki can be used in your business, to keep important documents and share with only the trusted parties. After a small configuration, you can make MediaWiki for private use.

In the MediaWiki, home directory, you may find a very important config file called "LocalSettings.php".

MediaWiki has user groups where you can decide which permission should be given. These permissions can be configured by changing the values of $wgGroupPermissions array. Please consider the following code. 

$wgGroupPermissions['*'] defines the none users, (viewers with no account)


After all, you can do further customization, like hiding particular widget from anonymous users. 


In the above code, please note "if($wgUser->isLoggedIn())" part. This is a simple validation, where it checks whether the viewer is logged in or not. Once it got true, then the sidebar will be appeared. This a good way of removing sidebar from none logged in viewers.

Tuesday, November 26, 2013

SQL*PLUS

This is a quick and dirty installation of sql*plus in debian based systems.


1. Download sql plus

oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm
oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm
oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm

2. Install 'alien'

#apt-get install alien

3. Install rpms

#alien -i oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm
#alien -i oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm
#alien -i oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm

4. Install Linux kernel AIO library

# apt-get install libaio1

5. oracle.conf

# touch /etc/ld.so.conf.d/oracle.conf
# echo "/usr/lib/oracle/12.1/client/lib/" >> /etc/ld.so.conf.d/oracle.conf

6. configure dynamic linker run-time bindings

# ldconfig

7. Edit ~/.bash_profile and export oracle client path.

export ORACLE_HOME=/usr/lib/oracle/12.1/client64




7. Create the following file.

 # touch $ORACLE_HOME/network/admin/tnsnames.ora

8. connect to a db

# sqlplus user/password@192.168.1.8:1521/orcl