Author Archives: admin

iftop for Linux bandwidth monitoring

Since I often work remotely (coffices and stuff), I use 3G/4G modems with me to provide some connectivity while I'm out. Adding the VPN services in-between I need to know how much traffic is passing through my network, inbound and outbound.

So iftop was the easiest and lightest thing I found. It's in Fedora's repos (I believe Ubuntu's too) so a simple `yum install iftop` resolved the deps for me with everything.

To run that, a:

iftop -i wlan0

(or whatever your interface is) would start that monitor. The listening would probably require you to sudo before that.

iftop-traffic

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

What is the upper bound of z-index?

Since W3C define it is an integer number, and the majority of systems/software is limiting integers to 32bit signed numbers, that should be 2`147`483`647 (which would also be the limit for most integer values used in programming).

Still, it depends on the browser, but I wouldn't go above that number.

Reference: http://stackoverflow.com/questions/491052/mininum-and-maximum-value-of-z-index

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Laggy Flash on Linux – Chrome

Sometimes the Linux Flash player starts lagging in the browser. This doesn't seem to fix it when trying to load Flash through another browser or restarting all browser windows completely.

A quick workaround in Chrome is playing with the Flash libraries. There is a version shipped together with Chrome and you can also use the library from the Flash player itself. If you have configured both .so files and navigate to:

  1. chrome://plugins

Then you will find in the plugins list the Flash options similarly to the following screen:

chrome-linux-flash

By switching between the different libraries the lagging issue should get fixed. If not, update your library versions and use that approach when the browser rendering gets buggy again.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Fix new line characters with Eclipse

One of the most popular differences between operating systems is the new line separators used in each one of them.

Typically, the top three OS out there print new lines this way:

  • Windows - CRLF, \r\n
  • Mac OS X - CR, \r
  • Linux/UNIX - LF, \n

It's normally an issue when working with a text document under different OS (or deploying to servers).

Luckily, there is a function in Eclipse that would help you automatically convert line endings - "Convert Line Delimiters To" under "File"

eclipse-convert-lines

As a Linux user myself I personally prefer the UNIX-style as our servers are always running under some Linux derivative (and it helps mitigating possible issues related to this for version control systems or deploy scripts).

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Tether Internet from a mobile 3G in Fedora via Wi-Fi

I've found a great guide for Internet tethering from Ubuntu. You could use the same guide in Fedora with Gnome or other Gnome-related platform.

If you have a UDP (LAN) wired connectivity or a mobile broadband connection, you could create an ad-hoc wifi network that spreads that internet connectivity. Follow the steps, specifically the ad-hoc and automattic settings, as well as adding a specific WEP-protected password, in order to share the Internet connection to another device.

Keep in mind that 'Shared' option is mandatory for the 'server' and you also have to pick 'ad-hoc' type of network from the other device that you use to connect from.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Fedora on Mate small updates

I did two small updates today on the Fedora Mate setup (using the old Gnome supported release instead of the new terrible desktop environment).

First off, by default in Mate there are no Shutdown or Restart buttons. In order to be able to reboot, you need to wait for 60 seconds to logoff to the login screen and then reboot.

You could fix that by installing the ConsoleKit and activating the service as described here.

Second, since there is no UI to change the background visible on login and for unlocking (the annoying fireworks background), it's located in /usr/share/backgrounds/beefy-miracle/default/standard named 'beefy-miracle.png' (normally), though it's really linked from /usr/share/backgrounds/default.png (which links to the first one). So feel free to replace it and solve your problems.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Setting up Grails and Postgres on Fedora

On Fedora, install Groovy with yum.

Then, download Grails and follow the guide: http://grails.org/doc/latest/guide/gettingStarted.html#requirements

Important: set correct Java and Grails home paths to be used by the engine.

Plain and simple guide for Postgres - https://community.jboss.org/wiki/InstallPostgreSQLOnFedora?_sscc=t

The only difference here was that initdb was called through:

sudo postgresql-setup initdb

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com