terça-feira, 26 de abril de 2011

Shell: Remove Last Character From String / Line / Word

The % is bash parameter substitution operators which remove from shortest rear (end) pattern.

$ x="foo bar"
$ echo "${x%?}"
$ foo ba

Referência: nixCraft

sábado, 12 de março de 2011

Slackware: awesome-3.4.10

First, you need compile and reinstall cairo with the flag --enable-xcb. Retrieve from a Slackware repository and recompile it yourself.

Install the libraries:

- imlib2 at slackbuilds.org
- lua at slackbuilds.org
- libev at slackbuilds.org
- libxdg-basedir at r3n4n-slackbuilds-libxdg-basedir

Install awesome window manager. SlackBuild at r3n4n-slackbuilds-awesome

sábado, 26 de fevereiro de 2011

Chrome: Java support for Linux Google Chrome

As root (Slackware x86_64):

# mkdir /opt/google/chrome/plugins
# cd /opt/google/chrome/plugins
# ln -s /usr/lib64/java/jre/lib/amd64/libnpjp2.so

terça-feira, 1 de fevereiro de 2011

X11: Disable screen shut off with VLC

# Turn off monitor modes that will power down,
# standby or blank the screen:
$ /usr/bin/xset -dpms
$ /usr/bin/xset s off
# Open VLC:
$ /usr/bin/vlc "$@"
# Re-enable modes:
$ /usr/bin/xset dpms
$ /usr/bin/xset s on

sexta-feira, 10 de dezembro de 2010

VirtualBox: iniciando uma VM pelo terminal

$ VBoxManage list vms
$ nohup VBoxHeadless –startvm 'Windows' -p 3389
$ VBoxManage controlvm 'Windows' poweroff

Drunk Penguins

Drunk Penguins
Drunk Penguins