Tag Archives: ubuntu

Issue with Terminator keybindings in Ubuntu 12.04

17 May

If Terminator keybindings with Ctrl-something are not working for you, it’s due to a bug.

Until it is fixed, you can edit your ~/.config/terminator/config and replace <Primary> by <Ctrl>.

Clone-a-database one-liner

9 May

I had to clone a remote MySQL database into my Ubuntu notebook, and I just felt like doing a one-liner for it.

$ mysqladmin -f -uroot create sandbox &&
ssh luisfarzati@mydatabasehost.com "mysqldump -uroot sandbox | gzip -f" | gunzip | mysql -uroot sandbox

Sending data to the clipboard from command line

26 Apr

In several occasions I find myself catting some file and then having to select the entire text with the mouse. If I want to keep my hands on the keyboard, I have to do a vim file, ggVG, “+y, :q.

Well, I found a way to do it faster and nicer simply by piping to the clipboard, thanks to xclip.

To use it, just install it and configure an alias in your .bashrc file, as follows:

$ sudo apt-get install xclip
$ alias clipboard='xclip -selection clipboard'

Then, when you need to do something like configuring your SSH key in GitHub, you just:

$ cat ~/.ssh/id_rsa.pub | clipboard

Thanks to Brian Racer for this snippet!

Ubuntu 10.10 suspend/resume issue

3 Nov

Tired of virtualboxing Linux for development (nothing wrong with VirtualBox, though) I’ve decided to dual-boot with Ubuntu 10.10 desktop edition. Everything was just fine until I close the lid and had some lunch. When I came back I found out that Ubuntu was booting from the start.

I had it fixed by adding the following option to GRUB_CMDLINE_LINUX in the /etc/default/grub file:
GRUB_CMDLINE_LINUX="acpi_sleep=nonvs"
Then I had to update grub by executing
sudo update-grub
And finally, had to restart Ubuntu in order to get the new boot configuration.

 

%d bloggers like this: