Linux rename a bunch of file’s extensions

In order to rename a whole folders file extensions from jpeg to jpg I wrote this script called rename.sh in bash. #!/bin/bash for filename in *.jpeg do echo $filename; cleaned=`basename $filename .jpeg`; echo $cleaned; mv $filename $cleaned.jpg; done Then I made is executable from the command line. chmod +x rename.sh Then ran it in the Read more about Linux rename a bunch of file’s extensions[…]

Query to insert all countries into database

I needed to insert all of the countries in the world into a database. I couldn’t find the query to run, so I created my own. Here it is. ‘country’ is the table name and ‘name’ is the column name. INSERT INTO country (name) VALUES (‘Afghanistan’), (‘Albania’), (‘Algeria’), (‘Andorra’), (‘Angola’), (‘Antigua and Barbuda’), (‘Argentina’), (‘Armenia’), Read more about Query to insert all countries into database[…]

Linux Ubuntu 12.04 alt-tab not working

I’ve recently installed Ubuntu 12.04 Prestige Pangolin (I use Gnome Classic), and immediately noticed that the alt+tab shortcut wasn’t working. I tried fixing it within Applications>Systems Tools>System Settings, but that did not work. I have compiz Config Manager already install so I figured I could use that version instead (it looks nicer anyway). Finally, I’ve Read more about Linux Ubuntu 12.04 alt-tab not working[…]