<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="http://oprod.net/feed.xml" rel="self" type="application/atom+xml" /><link href="http://oprod.net/" rel="alternate" type="text/html" /><updated>2020-10-07T19:04:10+00:00</updated><id>http://oprod.net/feed.xml</id><title type="html">oprod.net</title><subtitle>Blogging about my projects, Ruby on Rails and RubyMotion</subtitle><author><name>Andrei G</name></author><entry><title type="html">Play media on Shoes4 with JavaFX MediaPlayer</title><link href="http://oprod.net/shoes4-play-media-with-javafx-mediaplayer/" rel="alternate" type="text/html" title="Play media on Shoes4 with JavaFX MediaPlayer" /><published>2016-02-27T16:37:00+00:00</published><updated>2016-02-27T16:37:00+00:00</updated><id>http://oprod.net/shoes4-play-media-with-javafx-mediaplayer</id><content type="html" xml:base="http://oprod.net/shoes4-play-media-with-javafx-mediaplayer/">&lt;p&gt;For Shoes4 the &lt;a href=&quot;https://github.com/shoes/shoes4/issues/113&quot;&gt;video&lt;/a&gt; method is not yet available so if you want to play an mp3 file for example on &lt;a href=&quot;https://github.com/shoes/shoes4&quot;&gt;Shoes4&lt;/a&gt; you can use the &lt;a href=&quot;https://docs.oracle.com/javafx/2/api/javafx/scene/media/MediaPlayer.html&quot;&gt;MediaPlayer&lt;/a&gt; class from JavaFX.
&lt;br /&gt;
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 &lt;a href=&quot;https://docs.oracle.com/javafx/2/api/javafx/embed/swing/JFXPanel.html&quot;&gt;JFXPanel&lt;/a&gt; because the MediaPlayer is depending on the JavaFX interface. Otherwise you will experience an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java.lang.IllegalStateException: Toolkit not initialized&lt;/code&gt; exception.
&lt;br /&gt;
For example to play &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file.mp3&lt;/code&gt; you can run the following code:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'shoes'&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;java_import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javafx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;scene&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;media&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Media&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;java_import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javafx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;scene&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;media&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;MediaPlayer&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;java_import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javafx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;embed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;swing&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;JFXPanel&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;Shoes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;app&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;JFXPanel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Media&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;file:///Users/andrei/Downloads/a.mp3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@player&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;MediaPlayer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;media&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@player&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;play&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name>Andrei G</name></author><summary type="html">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:</summary></entry><entry><title type="html">Reviving the blog</title><link href="http://oprod.net/reviving-the-blog/" rel="alternate" type="text/html" title="Reviving the blog" /><published>2015-08-11T16:18:00+00:00</published><updated>2015-08-11T16:18:00+00:00</updated><id>http://oprod.net/reviving-the-blog</id><content type="html" xml:base="http://oprod.net/reviving-the-blog/">&lt;p&gt;After almost 2 years of no posts today I’m reviving the blog 🎉&lt;/p&gt;

&lt;p&gt;As part of the reviving process I’ve changed the blog to the &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll static website and blog platform&lt;/a&gt;
and I’ve also changed the old Bootstrap theme to a new one, &lt;a href=&quot;https://github.com/rosario/kasper&quot;&gt;kasper&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The blog is hosted as a GitHub page and it’s source can be found at: &lt;a href=&quot;https://github.com/otzy007/oprod.net&quot;&gt;https://github.com/otzy007/oprod.net&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrei G</name></author><summary type="html">After almost 2 years of no posts today I’m reviving the blog 🎉</summary></entry><entry><title type="html">Migrating from Joomla to ruhoh</title><link href="http://oprod.net/migrating-from-joomla-to-ruhoh/" rel="alternate" type="text/html" title="Migrating from Joomla to ruhoh" /><published>2013-02-13T00:00:00+00:00</published><updated>2013-02-13T00:00:00+00:00</updated><id>http://oprod.net/migrating-from-joomla-to-ruhoh</id><content type="html" xml:base="http://oprod.net/migrating-from-joomla-to-ruhoh/">&lt;p&gt;It’s about time to migrate the site from the old Joomla 1.5 CMS to a new one.
So I’ve choosed &lt;a href=&quot;http://ruhoh.com/&quot;&gt;ruhoh&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;Now oprod.net website is still under development, it still needs a new downloads
page and some minor design things.&lt;/p&gt;

&lt;p&gt;So… Welcome to the new website.&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="blog" /><summary type="html">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.</summary></entry><entry><title type="html">Slackware64 packages repository</title><link href="http://oprod.net/slackware64-packages-repository/" rel="alternate" type="text/html" title="Slackware64 packages repository" /><published>2013-01-20T11:53:55+00:00</published><updated>2013-01-20T11:53:55+00:00</updated><id>http://oprod.net/slackware64-packages-repository</id><content type="html" xml:base="http://oprod.net/slackware64-packages-repository/">&lt;p&gt;I've created my own repository with some Slackware64 packages at: &lt;a href=&quot;http://sourceforge.net/projects/slackware64pack/files&quot; target=&quot;_blank&quot;&gt;https://sourceforge.net/projects/slackware64pack/files&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Right now there are only nightly builds for &lt;a href=&quot;http://sourceforge.net/projects/slackware64pack/files/nightly/xbmc/&quot; target=&quot;_blank&quot;&gt;XBMC&lt;/a&gt;&lt;a href=&quot;https://sourceforge.net/projects/slackware64pack/files/nightly/xbmc/&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt; and &lt;a href=&quot;http://sourceforge.net/projects/slackware64pack/files/nightly/kdevelop/&quot; target=&quot;_blank&quot;&gt;KDevelop&lt;/a&gt; available, but in the future more will come ;)&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="Slackware64" /><category term="packages" /><category term="repository" /><category term="Slackware" /><summary type="html">I've created my own repository with some Slackware64 packages at: https://sourceforge.net/projects/slackware64pack/files Right now there are only nightly builds for XBMC and KDevelop available, but in the future more will come ;)</summary></entry><entry><title type="html">Playing with Rails: Slackware ChangeLogs on Twitter</title><link href="http://oprod.net/playing-with-rails-slackware-changelogs-on-twitter/" rel="alternate" type="text/html" title="Playing with Rails: Slackware ChangeLogs on Twitter" /><published>2012-06-21T06:54:34+00:00</published><updated>2012-06-21T06:54:34+00:00</updated><id>http://oprod.net/playing-with-rails-slackware-changelogs-on-twitter</id><content type="html" xml:base="http://oprod.net/playing-with-rails-slackware-changelogs-on-twitter/">&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Here's the link to the app: &lt;a href=&quot;http://slackware-changelog.oprod.net&quot; target=&quot;_blank&quot;&gt;http://slackware-changelog.oprod.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There you will find the accounts for different Slackware versions.&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="Slackware" /><category term="ChangeLog" /><category term="Ruby on Rails" /><category term="Twitter" /><summary type="html">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: http://slackware-changelog.oprod.net There you will find the accounts for different Slackware versions.</summary></entry><entry><title type="html">Falling snowflakes on your Tumblr page</title><link href="http://oprod.net/falling-snow-flakes-on-tumblr-page/" rel="alternate" type="text/html" title="Falling snowflakes on your Tumblr page" /><published>2011-12-17T18:07:53+00:00</published><updated>2011-12-17T18:07:53+00:00</updated><id>http://oprod.net/falling-snow-flakes-on-tumblr-page</id><content type="html" xml:base="http://oprod.net/falling-snow-flakes-on-tumblr-page/">&lt;p&gt;I see that a &lt;a href=&quot;index.php/news/1-news/79-snow-script&quot; title=&quot;snow script&quot;&gt;previous article&lt;/a&gt; gets lots of hits from people who want to put the&lt;a href=&quot;index.php/news/1-news/79-snow-script&quot;&gt; falling snowflakes script&lt;/a&gt; on their &lt;a href=&quot;http://tumblr.com&quot; target=&quot;_blank&quot; title=&quot;tumblr&quot;&gt;Tumblr&lt;/a&gt; pages.&lt;/p&gt;
&lt;p&gt;In order to put this script you need to go to your page and click &quot;&lt;strong&gt;Customize&lt;/strong&gt;&quot;. Then you will need need to click &quot;&lt;strong&gt;Edit HTML&lt;/strong&gt;&quot;, scroll down to the end of the code and before &lt;strong&gt;&amp;lt;/body&amp;gt;&lt;/strong&gt; paste this code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ec2.oprod.net/snow/snow.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Don't forget to save ;)&lt;/p&gt;
&lt;p&gt;The script can be used also on Wordpress, Blogger or other CMS.&lt;/p&gt;
&lt;p&gt;If you want to download the script or just to share your appreciation for it go to &lt;a href=&quot;http://www.peters1.dk/webtools/javascript/sne.php?sprog=en&quot; target=&quot;_blank&quot; title=&quot;peters1.dk&quot;&gt;peters1.dk&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="Tumblr" /><category term="snowflakes" /><category term="script" /><category term="snow" /><summary type="html">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 &quot;Customize&quot;. Then you will need need to click &quot;Edit HTML&quot;, scroll down to the end of the code and before &amp;lt;/body&amp;gt; paste this code: &amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ec2.oprod.net/snow/snow.js&quot;&amp;gt;&amp;lt;/script&amp;gt; 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 peters1.dk</summary></entry><entry><title type="html">JRemoteShell: a simple shell server wrote in Java</title><link href="http://oprod.net/jremoteshell-a-simple-shell-server-written-in-java/" rel="alternate" type="text/html" title="JRemoteShell: a simple shell server wrote in Java" /><published>2011-11-17T20:08:36+00:00</published><updated>2011-11-17T20:08:36+00:00</updated><id>http://oprod.net/jremoteshell-a-simple-shell-server-written-in-java</id><content type="html" xml:base="http://oprod.net/jremoteshell-a-simple-shell-server-written-in-java/">&lt;p&gt;Here’s a small shell server written in Java by me.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Please note that this application is not safe to use because it doesn’t use encryption or authentication.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To connect to the server you can use Putty with a raw connection or netcat:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nc host 8100&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;For get: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nc host 8101 &amp;gt; file&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For put: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nc host 8101 &amp;lt; get&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Download JAR file: &lt;a href=&quot;https://github.com/downloads/otzy007/JRemoteShell/JRemoteShell.jar.zip&quot;&gt;https://github.com/downloads/otzy007/JRemoteShell/JRemoteShell.jar.zip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github repository: &lt;a href=&quot;https://github.com/otzy007/JRemoteShell&quot; target=&quot;_blank&quot;&gt;https://github.com/otzy007/JRemoteShell&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source snapshot:&lt;a href=&quot;https://github.com/downloads/otzy007/JRemoteShell/otzy007-JRemoteShell-d66e2b9.zip&quot;&gt; https://github.com/downloads/otzy007/JRemoteShell/otzy007-JRemoteShell-d66e2b9.zip&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="JRemoteShell" /><category term="Java" /><category term="Shell" /><summary type="html">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 &amp;gt; file For put: nc host 8101 &amp;lt; get Download JAR file: https://github.com/downloads/otzy007/JRemoteShell/JRemoteShell.jar.zip Github repository: https://github.com/otzy007/JRemoteShell Source snapshot: https://github.com/downloads/otzy007/JRemoteShell/otzy007-JRemoteShell-d66e2b9.zip</summary></entry><entry><title type="html">Simple Java template for KDevelop</title><link href="http://oprod.net/simple-java-template-for-kdevelop/" rel="alternate" type="text/html" title="Simple Java template for KDevelop" /><published>2011-10-09T06:40:33+00:00</published><updated>2011-10-09T06:40:33+00:00</updated><id>http://oprod.net/simple-java-template-for-kdevelop</id><content type="html" xml:base="http://oprod.net/simple-java-template-for-kdevelop/">&lt;p&gt;To enable the template move the archive to:
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/share/apps/kdevappwizard/templates/simple_java.tar.bz2&lt;/code&gt;
or
``~/.kde4/share/apps/kdevappwizard/templates/simple_java.tar.bz2`&lt;/p&gt;

&lt;p&gt;Download: &lt;a href=&quot;https://opendesktop.org/content/download.php?content=145846&amp;amp;id=1&amp;amp;tan=74368116&quot; target=&quot;_blank&quot;&gt;https://opendesktop.org/content/download.php?content=145846&amp;amp;id=1&amp;amp;tan=74368116&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrei G</name></author><category term="KDevelop" /><category term="Java" /><category term="template" /><summary type="html">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` Download: https://opendesktop.org/content/download.php?content=145846&amp;amp;id=1&amp;amp;tan=74368116</summary></entry><entry><title type="html">Compress RAM with zRam in Slackware</title><link href="http://oprod.net/compress-ram-with-zram-in-slackware/" rel="alternate" type="text/html" title="Compress RAM with zRam in Slackware" /><published>2011-10-08T13:14:43+00:00</published><updated>2011-10-08T13:14:43+00:00</updated><id>http://oprod.net/compress-ram-with-zram-in-slackware</id><content type="html" xml:base="http://oprod.net/compress-ram-with-zram-in-slackware/">&lt;h4&gt;Update: you can find the tarball for this script at: &lt;a href=&quot;http://github.com/downloads/otzy007/enable-zRam-in-Slackware/enable-zram-noarch.tgz&quot;&gt;http://github.com/downloads/otzy007/enable-zRam-in-Slackware/enable-zram-noarch.tgz &lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Referring to this&lt;a href=&quot;http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html&quot; target=&quot;_blank&quot;&gt; article&lt;/a&gt; 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 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/rc.d/rc.zram&lt;/code&gt; and put this script into it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/bash
#
# /etc/rc.d/rc.zram
# Script to start zRam (Virtual Swap Compressed in RAM)
#
# Size of swap space in MB
# default 1GB

SIZE=1024

start() {
  modprobe zram
  echo $SIZE*1024*1024 | bc &amp;gt; /sys/block/zram0/disksize
  mkswap /dev/zram0
  swapon /dev/zram0
}

stop() {
  swapoff /dev/zram0
}

case &quot;$1&quot; in
  start)
    start
  ;;

  stop)
    stop
  ;;

  restart)
    echo 1 &amp;gt; /sys/block/zram0/reset
  ;;

  *)
  echo &quot;Usage: $0 (start|stop|restart)&quot;
esac
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Remember to make it executable:&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod +x /etc/rc.d/rc.zram&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also copy this lines to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/rc.d/rc.local&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/rc.d/rc.M&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# Start zram swap space
if [ -x /etc/rc.d/rc.zram ]
then
        /etc/rc.d/rc.zram start
fi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Andrei G</name></author><category term="Slackware" /><category term="zram" /><summary type="html">Update: you can find the tarball for this script at: http://github.com/downloads/otzy007/enable-zRam-in-Slackware/enable-zram-noarch.tgz 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: #!/bin/bash # # /etc/rc.d/rc.zram # Script to start zRam (Virtual Swap Compressed in RAM) # # Size of swap space in MB # default 1GB SIZE=1024 start() { modprobe zram echo $SIZE*1024*1024 | bc &amp;gt; /sys/block/zram0/disksize mkswap /dev/zram0 swapon /dev/zram0 } stop() { swapoff /dev/zram0 } case &quot;$1&quot; in start) start ;; stop) stop ;; restart) echo 1 &amp;gt; /sys/block/zram0/reset ;; *) echo &quot;Usage: $0 (start|stop|restart)&quot; esac 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 ] then /etc/rc.d/rc.zram start fi</summary></entry><entry><title type="html">Turning ON/OFF wireless on ASUS K52j</title><link href="http://oprod.net/turning-onoff-wireless-on-asus-k52j/" rel="alternate" type="text/html" title="Turning ON/OFF wireless on ASUS K52j" /><published>2011-03-31T18:31:42+00:00</published><updated>2011-03-31T18:31:42+00:00</updated><id>http://oprod.net/turning-onoff-wireless-on-asus-k52j</id><content type="html" xml:base="http://oprod.net/turning-onoff-wireless-on-asus-k52j/">&lt;p&gt;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: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/acpi/events/etc/acpi/events/asus-wireless-switch&lt;/code&gt;
This file will contain the hotkey and the path to the script which is setting the wireless ON/OFF.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/acpi/events/etc/acpi/events/asus-wireless-switch&lt;/code&gt; content will be:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#Enable the Fn-F2 button to turn on/off wireless
#/etc/acpi/events/default
event=hotkey ATKD 0000005d
action=/etc/acpi/asus-wireless-switch.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then create another one: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/acpi/asus-wireless-switch.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With this script in it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#/etc/acpi/asus-wireless-switch.sh
#based on http://ubuntuforums.org/archive/index.php/t-1460790.html
#!/bin/sh
WLANSTATUS=`cat /sys/class/ieee80211/phy0/rfkill*/state`

test -z $WLANSTATUS &amp;amp;&amp;amp; exit 1

if [ $WLANSTATUS = 0 ]; then
        echo 0 &amp;gt; /sys/devices/platform/asus_laptop/wlan
        echo 1 &amp;gt; /sys/class/ieee80211/phy0/rfkill*/state
elif [ $WLANSTATUS = 1 ]; then
        echo 1 &amp;gt; /sys/devices/platform/asus_laptop/wlan
        echo 0 &amp;gt; /sys/class/ieee80211/phy0/rfkill*/state
fi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Andrei G</name></author><category term="Asus" /><category term="K52j" /><category term="Slackware" /><category term="Linux" /><category term="wireless" /><summary type="html">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 #/etc/acpi/events/default event=hotkey ATKD 0000005d action=/etc/acpi/asus-wireless-switch.sh Then create another one: /etc/acpi/asus-wireless-switch.sh With this script in it: #/etc/acpi/asus-wireless-switch.sh #based on http://ubuntuforums.org/archive/index.php/t-1460790.html #!/bin/sh WLANSTATUS=`cat /sys/class/ieee80211/phy0/rfkill*/state` test -z $WLANSTATUS &amp;amp;&amp;amp; exit 1 if [ $WLANSTATUS = 0 ]; then echo 0 &amp;gt; /sys/devices/platform/asus_laptop/wlan echo 1 &amp;gt; /sys/class/ieee80211/phy0/rfkill*/state elif [ $WLANSTATUS = 1 ]; then echo 1 &amp;gt; /sys/devices/platform/asus_laptop/wlan echo 0 &amp;gt; /sys/class/ieee80211/phy0/rfkill*/state fi</summary></entry></feed>