Batch resizing images on the Linux CLI

Make sure you have installed Image Magic sudo apt-get install imagemagick And then, from the command line: mogrify -resize 50% *png # keep image aspect ratio mogrify -resize 320x240 *png... Read more »

A few tweaks after installing Ubuntu 14.04

Terminal commands: # Update system: sudo apt-get update sudo apt-get upgrade # Restricted extras: sudo apt-get install ubuntu-restricted-extras # CCSM: sudo apt-get install compizconfig-settings-manager # if youuse gnome sudo apt-get... Read more »

How to reset forgotten MySQL root password on CentOS

This are the steps: # service mysqld stop # mysqld_safe --skip-grant-tables & # mysql --user=root mysql MYSQL> update user set Password=PASSWORD('new-password') where user='root'; MYSQL> flush privileges; MYSQL> exit; # service... Read more »

Trying to install capybara-webkit

Add the gem to your gem file # Gemfile gem 'capybara-webkit' And bundle bundle install Ooops! That gave me the error: qmake: could not find a Qt installation of ”...... Read more »

Testing rails mountable engine routes with rspec

In order to test engine routes (and controllers) you may need to set the routes attributes: describe Gossiper::NotificationsController, 'routing' do # here's the trick routes { Gossiper::Engine.routes } it "routes... Read more »

Banco do Brasil no Ubuntu 13.4 no Firefox

Depois de instalar o java, parece que o que foi preciso fazer foi o seguinte: sudo ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so /usr/lib/firefox-addons/plugins A dica veio daqui. Funcionou do ubuntu 13.4. Read more »