Zambini’s Photos A Beginning Photo Blog

5Jul/100

Workaround for Ubuntu and Nautilus’s capital .JPG issue

Hey All!

I just wrote a little ditty on LaunchPad regarding an issue I had uploading images to multiple-image uploader sites (like Facebook).

I use Ubuntu (10.04) Linux primarily on this machine and Google Picasa to organize my photos and choose which ones to export, and when it does, it outputs them to "filename.JPG". This is a problem, however, because for some reason with Nautilus and sites like Facebook where you can upload multiple image files, it doesn't like having the .JPG in capitals.

Wait a minute, there are 50 or so images in there =O

Strange, yes. Unsolvable? No. Even though the LaunchPad bug has been semi-ignored and marked a low priority, Linux is awesome, and the fix is an incredibly simple set of commands in a terminal and then all it is from then on is a matter of running one custom script.

If you're only doing this once, or have a REALLY REALLY good memory, this is all you have to do:

1) Navigate to the folder all your pictures are in using the 'change directory' command

cd /home/USERNAME/Folder_where_your_pictures_are

2) Run this simple shell script:

for i in *.JPG; do mv "$i" "`basename $i .JPG `.jpg"; done

What this command does is does a simple for loop, iterating over each of the files that end with ".JPG" and re-names them to end in ".jpg".

If you want to be super awesome and efficient (aka: lazy), you can write this into a custom script so all you have to do is cd into the directory and type in the name of your script. Here's how to do it:

1) Navigate into your bin directory. I used /usr/bin. (There are people who might chastise me for not putting it in /usr/local/bin, but I don't really care. Feel free to explain to me why I should put it there in comments, but don't want a flame war.)

cd /usr/bin

2) Make a new script. You'll have to do it as a super user. I personally love pico, but you can use ANY text editor that doesn't throw any nasty formatting in anywhere. Here, I named my script "JPGtojpg" which is very easy to remember, and not many commands start with J, so in bash I can just hit a capital J and then hit <TAB> and it'll type the rest for me :) (remember when I said lazy? ;P )

sudo pico JPGtojpg

3) Make the contents of this script file as follows:

#!/bin/bash
for i in *.JPG; do mv "$i" "`basename $i .JPG `.jpg"; done

4) Save the file, and then change it to be executable. Again, must sudo it

sudo chmod +x JPGtojpg

5) You're done!

Now you can just cd into the directory where all those .JPG files are and type in "JPGtojpg" in the command line and it will fix them for you!

It's ALIVE! MUAUAHAHAHA!

Oh look, my photos! :D

A big thanks to Steve at Debian-Administration.org for the for loop. If you want an expert's explanation of this script, go to his post about it here.

15Jun/100

Painting My Lighter :D

Yep, you guessed it! It's CoH-Themed xD

Left: Allies. Right: Panzer Elite

The Progress:

8Jan/100

Xbox 360 Controller CoH Mod :)

Time to paint!

I got bored, and I also bought an Xbox 360 controller from GoGamer.com for super cheap. So what do you do with things that aren't expensive? MOD THEM! :D
I used this guide, which was extremely helpful :) Thank you MyCustomXbox.com :)

8Dec/0913

Play Borderlands over Hamachi LAN

Credit to: Kraytos @ Deviantart.com

Credit to: Kraytos @ Deviantart.com

Have you ever wanted to play Borderlands with your friends, but they just can't manage to host anything? I have the FREE (and not crappy) solution to that!

Preface: A bunch of my friends live on their college campus, so they have no access to Port Forwarding (which usually works perfectly with correct settings) and no other configurable things besides local access. This is a PAIN when it comes to playing Borderlands, because it requires five (count em, FIVE) ports be forwarded.

The solution: Hamachi and a little shortcut editing!

What is Hamachi? Taken from their website it is as follows:

LogMeIn Hamachi² is a hosted VPN service that securely connects devices and networks, extending LAN-like network connectivity to mobile users, distributed teams and business applications. You can easily create secure virtual networks on demand, across public and private networks.

Required Software:

Download and install Hamachi, and then create a network (or join your friend's network if they have already done this and you are trying to join)

create_network

Create a network

or join a network

or join a network

Then, here comes the part that took me forever to find on the internet: You have to DIRECT CONNECT with Borderlands. Since there isn't a dev console in Borderlands, you have to edit your target shortcut, which is very easy to do! First, create another shortcut of Borderlands on your desktop, then Right Click that new shortcut and click "Properties"

Edit the properties of the shortcut

Edit the properties of the shortcut

Then go to your Hamachi window and copy the Hamachi address of whoever you are trying to connect to (Right Click > Copy address). Then simply paste their address onto the end of your target, like so:

Right Click -> Copy Address

Right Click -> Copy Address

The end result of your new target should look something like this:

Edit the TARGET path of your shortcut. Simply append the Hamachi IP to the end of your target

Edit the TARGET path of your shortcut. Simply append the Hamachi IP to the end of your target

For yours, replace the "x.x.x.x" I have listed below with the Hamachi IP address you copied:

"C:\Program Files\Steam\Steam.exe" -applaunch 8980 x.x.x.x

Note: The above target is because I bought Borderlands on Steam. If you bought it elsewhere, yours will look something very similar, but not exact. Basically, as long as you follow this guide for your target value it'll work:

"{INSTALL PATH}" {hamachi_IP}

Then have your friend (or whoever is hosting) start Borderlands and hit "Host LAN Game." Then, once their game is up and running, run your custom shortcut. Its as simple as that!

Happy Borderlanding!