Friday, October 9, 2009
Ubuntu 9.10 Karmic Koala
A nova versão do Ubuntu está preste a sair. Neste momento ainda se encontra em versão beta, no entanto para todos os que quiserem ajudar a testar e fazer report de bugs, podem fazer o download em http://www.ubuntu.com/testing/karmic/beta.
Monday, September 21, 2009
Os Partidos Políticos Portugueses e o Vegetarianismo
O Centro Vegetariano há cerca de algumas semanas questionou os vários partidos políticos portugueses sobre assuntos do interesse da comunidade vegetariana portuguesa. Aparente até ao momento em que o artigo, que se encontra no site, foi escrito, apenas o Bloco de Esquerda se prontificou a dar conhecer a sua opinião, posições e propostas a todos nós. Resta também realçar que o Bloco de Esquerda é também dos únicos partidos que se pronunciou contra as touradas ou outro tipo de violência animal disfarçada de espectáculo ou arte.
Seria curioso e enriquecedor para a democracia portuguesa também conhecer a posição dos restantes partidos acerca deste assunto, fico e ficamos a aguardar.
Podem ler o conteúdo da resposta do BE ao Centro Vegetariano em: http://www.centrovegetariano.org/Page-20.html
BE contra os Rodeios: http://matportugal.blogspot.com/2008/09/bloco-de-esquerda-tambm-contra-rodeios.html
Seria curioso e enriquecedor para a democracia portuguesa também conhecer a posição dos restantes partidos acerca deste assunto, fico e ficamos a aguardar.
Podem ler o conteúdo da resposta do BE ao Centro Vegetariano em: http://www.centrovegetariano.org/Page-20.html
BE contra os Rodeios: http://matportugal.blogspot.com/2008/09/bloco-de-esquerda-tambm-contra-rodeios.html
Thursday, September 10, 2009
Swap partition and hibernation in Ubuntu
Hello lads,
today i was having some trouble hibernating my laptop after resizing of the swap partition, because Ubuntu was telling me that it couldn't find my it.
So what happened was that the partition identifier changed since the resizing of the partition, not the common identifier like /dev/sda5, but the UUID (Universal Unique Identifier) which is now used to identify the partitions in "modern" Linux.
So this was how I fixed it:
I used fdisk to know discover the name of my swap partition
$ sudo fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd53d826f
Device Boot Start End Blocks Id System
/dev/sda1 1 1824 14651248+ 83 Linux
/dev/sda2 7562 7821 2088450 5 Extended
/dev/sda3 1825 7561 46082452+ 83 Linux
/dev/sda5 7562 7821 2088418+ 82 Linux swap / Solaris
Looked up the UUID of the partition
$ sudo vol_id --uuid /dev/sda5
415df585-960f-49ca-b056-6202c1daac39
Edited my swap line in /etc/fstab, which is the file responsible for tracking devices, mounting points and other stuff (generally speaking)
$ vim /etc/fstab
Changed the swap line to look like this, and saved the file
UUID=415df585-960f-49ca-b056-6202c1daac39 none swap sw 0 0
Note that I used the UUID given by vol_id command
Then updated /etc/initramfs-tools/conf.d/resume with the UUID i got above
RESUME=UUID=415df585-960f-49ca-b056-6202c1daac39
This file is responsible for telling where to look up for the saved desktop state, generaly the swap partition, when the machine resumes from hibernation.
Finally I updated the boot-up scripts by doing
$ sudo update-initramfs -u
After this we can either restart the computer or just run
$ sudo swapon -a
to active all swap spaces available.
Et voilà I was done, and the hibernation worked!
today i was having some trouble hibernating my laptop after resizing of the swap partition, because Ubuntu was telling me that it couldn't find my it.
So what happened was that the partition identifier changed since the resizing of the partition, not the common identifier like /dev/sda5, but the UUID (Universal Unique Identifier) which is now used to identify the partitions in "modern" Linux.
So this was how I fixed it:
I used fdisk to know discover the name of my swap partition
$ sudo fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd53d826f
Device Boot Start End Blocks Id System
/dev/sda1 1 1824 14651248+ 83 Linux
/dev/sda2 7562 7821 2088450 5 Extended
/dev/sda3 1825 7561 46082452+ 83 Linux
/dev/sda5 7562 7821 2088418+ 82 Linux swap / Solaris
Looked up the UUID of the partition
$ sudo vol_id --uuid /dev/sda5
415df585-960f-49ca-b056-6202c1daac39
Edited my swap line in /etc/fstab, which is the file responsible for tracking devices, mounting points and other stuff (generally speaking)
$ vim /etc/fstab
Changed the swap line to look like this, and saved the file
UUID=415df585-960f-49ca-b056-6202c1daac39 none swap sw 0 0
Note that I used the UUID given by vol_id command
Then updated /etc/initramfs-tools/conf.d/resume with the UUID i got above
RESUME=UUID=415df585-960f-49ca-b056-6202c1daac39
This file is responsible for telling where to look up for the saved desktop state, generaly the swap partition, when the machine resumes from hibernation.
Finally I updated the boot-up scripts by doing
$ sudo update-initramfs -u
After this we can either restart the computer or just run
$ sudo swapon -a
to active all swap spaces available.
Et voilà I was done, and the hibernation worked!
Friday, July 10, 2009
Compiz giving me a headache
A while ago after disabling compiz to do some troubleshoot on some applications, I got some trouble trying to enabling it again, I was constantly getting the following message:
/usr/bin/compiz.real (core) - Error: Could not acquire compositing manager selection on screen 0 display ":0.0"
/usr/bin/compiz.real (core) - Fatal: No manageable screens found on display :0.0
after some googling I came to this solution:
- run in the terminal
gconftool-2 --set --type=bool /apps/metacity/general/compositing_manager false
- logout/in and we're ready to re-enable the wonderful desktop effects!
/usr/bin/compiz.real (core) - Error: Could not acquire compositing manager selection on screen 0 display ":0.0"
/usr/bin/compiz.real (core) - Fatal: No manageable screens found on display :0.0
after some googling I came to this solution:
- run in the terminal
gconftool-2 --set --type=bool /apps/metacity/general/compositing_manager false
- logout/in and we're ready to re-enable the wonderful desktop effects!
Tuesday, June 30, 2009
Vim in hexadecimal mode
To set your favourite text editor to edit your files in hexadecimal you may use in normal mode:
:%!xxd
and to get back to ascii mode:
:%!xxd -r
:%!xxd
and to get back to ascii mode:
:%!xxd -r
Thursday, May 28, 2009
Dump terminal output to a file
Easy way to redirect the output of a command to both file and terminal:
bash$ my_command 2>&1 | tee my_log.txt
Great =)
bash$ my_command 2>&1 | tee my_log.txt
Great =)
Monday, May 25, 2009
Killing processes started in the current terminal
Imagine you're running some application, lets call it "foo", using an unix user shared with your work colleagues, and this application is also launched by them at the same time you're working. So along the time you may have several instances of this application, several processes with distinct PIDs. And all the sudden you need to kill all the instances that you previously launched but you need to avoid to kill the ones being used by your fellow colleagues. This is one way to do the trick.
Start by retrieving your tty (teletypewriter),
bash$ tty
/dev/pts/4
And then kill the process "foo" for the current "tty" you're using,
bash$ kill `ps -le | grep foo | grep "pts/4" | cut -d" " -f6 `
PS: If know a way to include the retrieval of the tty inside the grep command let know =)
Start by retrieving your tty (teletypewriter),
bash$ tty
/dev/pts/4
And then kill the process "foo" for the current "tty" you're using,
bash$ kill `ps -le | grep foo | grep "pts/4" | cut -d" " -f6 `
PS: If know a way to include the retrieval of the tty inside the grep command let know =)
Wednesday, April 29, 2009
Rename all files in one folder
This is a little tip for you, and a remider for me :P
bash $ for i in *;do mv $i `echo $i | sed 's/pattern/newpattern/'`; done
Sunday, April 26, 2009
Ubuntu 9.04
Have you noticed a image on the right of this blog saying that Ubuntu 9.04 is out?!
Well it is, so go and check it out, it has a lot of new stuff, is has a faster boot time than ever, and it's free, and open source!
So move your bottoms and download it!
Well it is, so go and check it out, it has a lot of new stuff, is has a faster boot time than ever, and it's free, and open source!
So move your bottoms and download it!
Tuesday, April 14, 2009
CodeCodex
Good site that i found the other day when i was searching some solutions for some code i was doing at work.
CodeCodex is a online shared code repository for people that don't want to reinvent the whe
(I love quoting site descriptions)
CodeCodex is a online shared code repository for people that don't want to reinvent the whe
(I love quoting site descriptions)
What is CodeCodex?
CodeCodex is a wiki for finding and improving code. Stop reinventing the wheel. Use CodeCodex to:
Browse and use pre-written code.
Learn new algorithms and methods for common programming tasks.
Use code in your own projects and submit new code for the community.
Improve performance of code in the repository and the organization of the library.
What's different about CodeCodex?
CodeCodex isn't just another code repository; it's a place where developers can actively engage with others to improve quantity and quality of the library. CodeCodex is the first online code library that captures the infinitely iterative nature of a wiki and uses it to constantly increase the quality of the library.
http://codecodex.com/
http://codecodex.com/wiki/index.php?title=Category:Java (Java category)
If you're into software coding you can help improving this site sending your own solution and algorithms!
Labels:
development,
geek,
open source,
programming
Tuesday, March 31, 2009
Monday, March 30, 2009
Why do we use Vim!?
http://www.viemu.com/a-why-vi-vim.html
This is a very interesting article talking about why people use or should use Vim as a programming text editor.
This is a very interesting article talking about why people use or should use Vim as a programming text editor.
Wednesday, March 25, 2009
Sunday, March 15, 2009
JAVA-TV
"Java-TV.com is a directory of videos, interviews and tutorials focused on software development activities with the Java™ programming language."
Give it a look.
http://www.java-tv.com/
Friday, March 13, 2009
Tetris Master playing invible Tetris!
This guy is unbelievable! Watching this video is breath taking.
Just image the amount of time this guy had on his hands to reach this level of playing.
Tuesday, March 10, 2009
Friday, February 20, 2009
How to disable your touchpad in Ubuntu 8.10 (Intrepid Ibex)
Today i found myself in the need to disable my laptop touchpad after ruining for various times my work by touching and taping it involuntarily with my arms while typing. So i googled it!
After finding some solutions over the net, which don't work now with the new xorg because of the almost empty xorg.conf, due to the great autodetection mechanism now implemented :) , i've found this excelent post in the ubuntu forums.
http://ubuntuforums.org/showpost.php?p=6077309&postcount=121
After following this post i just installed gsynaptics from the repositories and searched for the option to disable the touchpad, it was piece of cake!
The big bonus on this was that the enable/disable touchpad button in my laptop now works like a charm :)
After finding some solutions over the net, which don't work now with the new xorg because of the almost empty xorg.conf, due to the great autodetection mechanism now implemented :) , i've found this excelent post in the ubuntu forums.
http://ubuntuforums.org/showpost.php?p=6077309&postcount=121
After following this post i just installed gsynaptics from the repositories and searched for the option to disable the touchpad, it was piece of cake!
The big bonus on this was that the enable/disable touchpad button in my laptop now works like a charm :)
Thursday, February 19, 2009
Wednesday, February 11, 2009
Thursday, February 5, 2009
Friday, January 23, 2009
Tuesday, January 20, 2009
Monday, January 19, 2009
Sunday, January 18, 2009
Quake 3 on iPhone
WOW this one i wasn't expecting!!
Some guys are porting Quake 3, one of the most played FPS of all time, for the iPhone.
Check out some screenshots:
Project site: http://code.google.com/p/quake3-iphone/
Some guys are porting Quake 3, one of the most played FPS of all time, for the iPhone.
Check out some screenshots:
Project site: http://code.google.com/p/quake3-iphone/
Thursday, January 8, 2009
RocknRolla
I just love movies with a British accent!
RocknRolla is IMO a great movie. If you liked Snatch from the same director (Guy Ritchie), probably you'll like this one too.
It's a film about mobs, scams and crooks. It has a really good soundtrack, shady characters and a dry sarcastic humour. Some characters even remember me of Boris "Bullet dodger", as they keep on not dying!
Go and see this movie at a theatre next to you!!
RocknRolla is IMO a great movie. If you liked Snatch from the same director (Guy Ritchie), probably you'll like this one too.
It's a film about mobs, scams and crooks. It has a really good soundtrack, shady characters and a dry sarcastic humour. Some characters even remember me of Boris "Bullet dodger", as they keep on not dying!
Go and see this movie at a theatre next to you!!
Subscribe to:
Posts (Atom)