Play media on Shoes4 with JavaFX MediaPlayer

For Shoes4 the video method is not yet available so if you want to play an mp3 file for example on Shoes4 you can use the MediaPlayer class from JavaFX.
There is only one trick that you’re not allowed to miss and the trick is that you have to create a new instance of JFXPanel because the MediaPlayer is depending on the JavaFX interface. Otherwise you will experience an java.lang.IllegalStateException: Toolkit not initialized exception.
For example to play file.mp3 you can run the following code:

require 'shoes'

java_import javafx.embed.swing.JFXPanel do

  media ="file:///Users/andrei/Downloads/a.mp3")
  @player =
Author's profile picture Andrei G

Reviving the blog

After almost 2 years of no posts today I’m reviving the blog 🎉

As part of the reviving process I’ve changed the blog to the Jekyll static website and blog platform and I’ve also changed the old Bootstrap theme to a new one, kasper.

The blog is hosted as a GitHub page and it’s source can be found at:

Author's profile picture Andrei G

Migrating from Joomla to ruhoh

It’s about time to migrate the site from the old Joomla 1.5 CMS to a new one. So I’ve choosed ruhoh instead of upgrading to a new Joomla version because ruhoh generates a static website that I can easily host it almost anywhere without the need of a database or some server side scripting. Right now it’s hosted on GitHub.

Now website is still under development, it still needs a new downloads page and some minor design things.

So… Welcome to the new website.

Author's profile picture Andrei G on blog

Slackware64 packages repository

I've created my own repository with some Slackware64 packages at:

Right now there are only nightly builds for XBMC and KDevelop available, but in the future more will come ;)

Author's profile picture Andrei G

Playing with Rails: Slackware ChangeLogs on Twitter

While I was playing with Ruby on Rails and the Twitter Gem I've developed a small app to tweet any new changes in the Slackware's ChangeLog file.

Here's the link to the app:

There you will find the accounts for different Slackware versions.

Author's profile picture Andrei G

Falling snowflakes on your Tumblr page

I see that a previous article gets lots of hits from people who want to put the falling snowflakes script on their Tumblr pages.

In order to put this script you need to go to your page and click "Customize". Then you will need need to click "Edit HTML", scroll down to the end of the code and before </body> paste this code:

<script type="text/javascript" src=""></script>

Don't forget to save ;)

The script can be used also on Wordpress, Blogger or other CMS.

If you want to download the script or just to share your appreciation for it go to

Author's profile picture Andrei G

JRemoteShell: a simple shell server wrote in Java

Here’s a small shell server written in Java by me.

It has basic features such as: ls, cd, head, mv, cp and also: get and put, to get/put files on the server.

Please note that this application is not safe to use because it doesn’t use encryption or authentication.

To connect to the server you can use Putty with a raw connection or netcat:

nc host 8100

To use “get” or “put” for file transfer you must first type put or get followed by the name of the file and then connect to port 8101 using nc.

For get: nc host 8101 > file

For put: nc host 8101 < get

Download JAR file:

Github repository:

Source snapshot:

Author's profile picture Andrei G

Simple Java template for KDevelop

To enable the template move the archive to: /usr/share/apps/kdevappwizard/templates/simple_java.tar.bz2 or ``~/.kde4/share/apps/kdevappwizard/templates/simple_java.tar.bz2`


Author's profile picture Andrei G

Compress RAM with zRam in Slackware

Update: you can find the tarball for this script at:

Referring to this article it seems that using a swap disk is slower than compressing the data in the memory. Enabling this under Slackware Linux it’s pretty easy. Create the file /etc/rc.d/rc.zram and put this script into it:

# /etc/rc.d/rc.zram
# Script to start zRam (Virtual Swap Compressed in RAM)
# Size of swap space in MB
# default 1GB


start() {
  modprobe zram
  echo $SIZE*1024*1024 | bc > /sys/block/zram0/disksize
  mkswap /dev/zram0
  swapon /dev/zram0

stop() {
  swapoff /dev/zram0

case "$1" in


    echo 1 > /sys/block/zram0/reset

  echo "Usage: $0 (start|stop|restart)"

Remember to make it executable: chmod +x /etc/rc.d/rc.zram

Also copy this lines to /etc/rc.d/rc.local or /etc/rc.d/rc.M

# Start zram swap space
if [ -x /etc/rc.d/rc.zram ]
        /etc/rc.d/rc.zram start
Author's profile picture Andrei G

Turning ON/OFF wireless on ASUS K52j

Here’s a quick fix to enable/disable wireless using Fn+F2 on Slackware Linux on ASUS K52j and also the LED to indicate the status of the wireless. First you need to create this file: /etc/acpi/events/etc/acpi/events/asus-wireless-switch This file will contain the hotkey and the path to the script which is setting the wireless ON/OFF. The /etc/acpi/events/etc/acpi/events/asus-wireless-switch content will be:

#Enable the Fn-F2 button to turn on/off wireless
event=hotkey ATKD 0000005d

Then create another one: /etc/acpi/

With this script in it:

#based on
WLANSTATUS=`cat /sys/class/ieee80211/phy0/rfkill*/state`

test -z $WLANSTATUS && exit 1

if [ $WLANSTATUS = 0 ]; then
        echo 0 > /sys/devices/platform/asus_laptop/wlan
        echo 1 > /sys/class/ieee80211/phy0/rfkill*/state
elif [ $WLANSTATUS = 1 ]; then
        echo 1 > /sys/devices/platform/asus_laptop/wlan
        echo 0 > /sys/class/ieee80211/phy0/rfkill*/state
Author's profile picture Andrei G

Simple KDevelop C CMake and Makefile templates

Head over to the new KDevelop templates section for two KDevelop C templates. One is using a Makefile to compile and the other CMake. To use them just copy the archives to /usr/share/apps/kdevappwizard/templates/ or ~/.kde4/share/apps/kdevappwizard/templates`

CMake template:

Makefile template:

Author's profile picture Andrei G

KDE downloads section and more ;)

Now there's a KDE section on The first things I've add are two C templates for KDevelop: one is a CMake compiled project and the another is a

Author's profile picture Andrei G

My SlackBuilds

Right now I don't have any new projects, I'm just contributing to with SlackBuild scripts. You can see my contributions at:

Author's profile picture Andrei G

viewtyconv (the ffmpeg way)

Here’s the new viewtyconv script. It can be used to convert movies into DivX format for LG KU990 Viewty or similar phones from a Bash Shell. Now it’s using [[ffmpeg]], no longer [[mencoder]]. To use this script you’ll need to have installed ffmpeg and also lame. Ffmpeg must be configured with –enable-libmp3lame, otherwise the script will not work.

#by otzy_007
ffmpeg -i $1 -vcodec mpeg4 -s 400x240 -acodec libmp3lame -ab 128k -vtag DIVX $2

You can also download the scripts from here:

Author's profile picture Andrei G

public service is closing

After moving from to the free Virtual Computer is closing on March 15. Here’s the announcement: Now I’m downloading all my files but where I will find another like service to put my files on using ftp an also to get lot of space for them?

Author's profile picture Andrei G