Wednesday, September 28, 2016

Modify and build your own SikuliX

In this tutorial, I show steps to modify and edit sikulix under OSX environment. This should not be different with other *nix environment. However, for windows environment, you may need to adjust yourself.

Modify your code

  • Clone from the repository
  • Open the repository as maven project in netbeans. You can easily use this button to open the project open
  • You will see that the cloned project appeared in open windows like the following
  • Open the project. It will be like this
  • Modify any part you want to modify
  • Clean and build the maven project. If you open other sub project of sikulix, make sure that you clean and build only the main sikulix maven project

Create Installer

Go to File Finder in the repository folder. You will see one file named runSetup. Using your terminal and cd to the folder and run the setup.

$ runSetup

It will bring you to SikuliX installation. Please remember that if you build yourself, ALWAYS do it in offline mode, means that you are not supposed to download anything during the installation. In other words, because SikuliX will need some packages/libraries, before installing SikuliX using your own build, you MUST install SikuliX in your computer by running normal build first. You can download the normal build here

Back to runSetup. You will see SikuliX installation window as follows

Before you continue, please pay attention to in this folder part. That part shows you where you can find your new build. To make myself clearer, I mean this part

It shows me that I can find the build in /Users/arwankhoiruddin/Library/Application Support/Sikulix/SikulixSetup folder

Then follow the instructions carefully. I repeat once more, please do not download anything during this installation.

Now go to SikulixSetup folder. You will find your new and fresh build there

Just move or copy SikuliX to /Applications folder and voila! Your newly build sikulix is ready to use

Thursday, September 8, 2016

Customise Komode IDE command with python environment

Komodo is a lightweight and great programming IDE. Recently, I use the IDE to work on python. However, I got problem because I need to run the python from some virtual environments. To make it happen, this is what I did:

1. Create a shell script to run the virtual environment. For example we name the shell script runpyenv.sh, we may run the script with runpyenv.sh mycode.py. The code $1 will take the first input argument after the shell script name.
source ~/arwanenv/bin/activate
python $1
2. Now make the shell script to be executable
sudo chmod +x runpyenv.sh
3. Now you put the shell script inside the command of your Komodo. It will be better if you make the file parameter to be automatic. Here is the command in your Komodo
~/runpyenv.sh %F
Enjoy. Share your ideas in the comment if you have better idea.

Tuesday, August 23, 2016

How to stream online radio via ubuntu terminal

I am a big fans of unix terminal. Today I found something interesting I can do with ubuntu terminal i.e. stream online radio via terminal. Here are the steps needed to stream your chosen radio via terminal

Install mplayer
Update your ubuntu repository to ensure that you use the latest update then install mplayer using apt-get
$ sudo apt-get update
$ sudo apt-get install mplayer
Find the IP address of the radio you want to listen. 
You might find it from anywhere, but I prefer to choose from https://www.xatworld.com/radio-search/. In the following screen capture, I show you when I was trying to find IP address for MQ FM (it is a moslem radio in Indonesia). You just need to supply the radio name, press "search", after it is found then you can just press "Find IP" button. Voila! Your radio IP address is there.



 Open your radio using mplayer
Now it's the showtime! You can play your radio now. Type this in your terminal
$ mplayer http://202.91.11.18:8000
Happy streaming! :D