Batch unrar from OS X terminal

Here’s an easy way to unrar many archives at once into a specified folder.

Requires the command-line version of unrar to be installed. If you already have the excellent app UnRarX installed, you can use the unrar executable that’s included in the app instead if you want. Just replace unrar with /Applications/UnRarX.app/Contents/Resources/unrar.

find /Volumes/Path/To/Rar:ed/Content/ -name ‘*.rar’ -execdir unrar e -o- {} /Volumes/Path/To/Un:rared/Content/ \;

I find this especially useful to extract multiple episodes of a specific TV series for use with Plex, for example:

find /Volumes/Path/To/Rar:ed/Content/Name.of.TV.Series.S01* -name ‘*.rar’ -execdir unrar e -o- {} /Volumes/Path/To/Un:rared/Content/ \;

[PS3] How to play PS1 games on CFW 3.55 with multiMAN 02.07.06+

PS1 logo
This is a simple method which will allow you to play PS1 games on your PS3 with CFW 3.55.

Update: multiMAN 02.07.06 allows PS1 discs to appear in the XMMB Game column (in multiMAN), which enables starting the games without using file manager mode.

You’ll need:

– A jailbroken PS3 with CFW 3.55.
multiMAN 02.07.06 or above.
– A burned PS1 game backup.

Note: From what I understand, all games doesn’t work. Most of them seem to work however.

Instructions:

1. Start multiMAN.

2. Insert the game disc.

3. Enter file manager mode (press start + select).

4. Browse to the directory /dev_flash/ps1emu and hit X on the ps1_emu.self file. The game should now load.

(Optional) How to enable save games:

1. Power on the PS3, but don’t start multiMAN.

2. Go to “Memory Card Utility (PS/PS2)” in the GAME column.

3. Create a PS1 memory card.

4. Set it to Slot 1 (press the triangle button while selecting the memory card, and then assign it).

5. Start multiMAN, insert the game disc, and start it using the instructions above. Your virtual memory card will be in Slot 1.

Play Minecraft through a SOCKS-proxy (Windows)

This tutorial will explain how to get Minecraft running through a SOCKS-proxy.

You’ll need to have java and of course also Minecraft installed. To check whether java is installed, open up a command prompt, type “java” and hit enter.

You should get a list of different parameters for java. If not, follow the instructions here.

You’ll also need a SOCKS proxy server. In this example I’m using an SSH proxy server running on my local machine.

1. Navigate to C:\Users\YourUserName\AppData\Roaming\.minecraft\bin\ in Windows 7/Vista, or C:\Documents and Settings\YourUserName\Application Data\.minecraft\bin in Windows XP.

2. Open Notepad and paste the following:

java -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=9999 -Xmx800m -jar Minecraft.exe

Replace your own values for DsocksProxyHost and DsocksProxyPort.

3. Save the file as a .bat file, for example “minecraft_proxy.bat”. Don’t forget to save it in the /bin/ directory.

4. Try running the bat file. A command window should launch first, and then Minecraft, in its own window. You will see java console messages in the command window. Don’t close it, it will close Minecraft as well.

5. If everything is working correctly, create a shortcut to “minecraft_proxy.bat” and put it somewhere for easy access.

Enjoy Minecraft! :)

Merge csv files without any additional software (Windows)

Here’s a really neat way to merge csv files without any additional software.

1. Put all the csv files you want to merge into a folder.

2. Open up Notepad, and enter this code:

copy *.csv merged.csv

3. Go to “save as” and save the file as a .bat file, for example “merge.bat”. Put it into the same folder as the csv files. Remember to include the quotation marks in the file name.

4. Run the .bat file. Done!

How to easily remove your personal information from media files purchased from iTunes

iTMS Scrubber

Here’s an easy way to remove your personal information contained in media files purchased from iTunes.

I use a great little application called iTMS Scrubber for this purpose. It’s available for both Windows and Mac.

Download links:

Latest version of iTMS Scrubber for Windows (v2.3a)

Latest version of iTMS Scrubber for Mac (v1.1a)

Instructions for the Windows version:

Simply extract the contents to a folder, copy in the album files you want to de-personalise (don’t use your originals!) and run itms-scrubber. It will also extract the album art to a folder.jpg.

Instructions for the Mac version:

Simply drop your music and/or music video files onto the icon. It will process them in-place and write out report files to show the tags before and after scrubbing. You must drop the actual audio/video files, not the folder containing them.

How to change the default SSH port in Mac OS X (+10.5)

This will explain how to change the default SSH port in Mac OS X from 22 to something else.

This drastically reduces the risk of intrusion.

There are different ways to do this, but this is the most convenient way in my opinion.

1. Open up a terminal and enter

sudo pico /etc/services

Enter your password.

2. Scroll down to the very bottom and add the following line:

secret-ssh      12345/tcp    # secret SSH port

Replace 12345 with your desired port number, making sure that it doesn’t interfere with anything else running on your system.

3. Press CTRL-X and confirm by pressing Y and enter to save the file.

4. Now we need to modify /System/Library/LaunchDaemons/ssh.plist.

Again in the terminal, enter:

sudo pico /System/Library/LaunchDaemons/ssh.plist

Locate the following:

<key>SockServiceName<key>
<string>ssh</string>

Replace ssh with secret-ssh.

Save and exit as before.

5. Enter the following commands or reboot your machine to make the changes take effect:

sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load /System/Library/LaunchDaemons/ssh.plist

6. You’re done!

How to increase the font smoothing in Mac OS X (+10.5)

If you are using an older non-Apple display with your Mac (like me), you might notice that the font smoothing looks quite bad by default.

There’s an easy way to fix this.

Open up a terminal window and run this command:

defaults -currentHost write -globalDomain AppleFontSmoothing -int 3

Relog or restart, and the text will look much better.

Listen to your iTunes library from anywhere (Windows to Mac)

iTunes

In this guide, I will explain how to access and listen to your entire iTunes library from anywhere.

To do this, we will use iTunes “shared library” feature, and trick iTunes into thinking that the host computer is on the same network as the client computer.

Note – this tutorial describes how to connect from a Windows PC with iTunes (client), to a Mac with iTunes (host).

It’s probably not too difficult to also get this working Windows to Windows or Windows to Mac.

1. On your Mac, enable the built-in SSH server. Go to Settings -> Sharing -> and tick the “Remote login” box.

Advanced: You may want to change the default SSH port from 22 to something else. Check out my tutorial here.

2. Again on your Mac, open iTunes and open the preferences. Click on “Sharing” and tick the box “Share my library on my local network”. I recommend sharing the entire library (I have approximately 48 000 songs in my library and it’s no problem whatsoever). You don’t have to set a password.

Note the external IP address and the SSH port number of your Mac. Make sure it’s forwarded correctly if you’re behind a firewall or a router.

Important! iTunes needs to be left open and running on the Mac in order for this to work.

3. On the Windows PC, download and install the latest version of Cygwin here.

Make sure that the packages openssh and dns-sd are installed. To check whether they are, simply run each of them in the Cygwin terminal. If they are missing, just install them using Cygwin’s package manager.

Optional: This is not required, but I strongly recommend it. Download install the mintty terminal window for Cygwin here. It’s far superior to the default Cygwin shell.

4. Enter the following commands (in order) into Cygwin/mintty:

ssh -C -N -L 3689:localhost:3689 username@ip-to-your-mac.com -p 123

Replace username with your actual user name, ip-to-your-mac.com with your actual IP/host name, and 123 with the actual SSH port.

You will then be prompted for your password. Enter it and hit enter. This will create the SSH tunnel.

Then, enter this command:

dns-sd -P “Home iTunes” _daap._tcp local 3689 localhost.local.   127.0.0.1 “Arbitrary text record” &

You may need to delete the quotation marks and replace them if you copy the command directly from this page.

“Home iTunes” is just a placeholder name and could be anything. You should get some text saying that the service has been registered correctly.

5. Finally, open iTunes. You should see the shared library called “Home iTunes” or whatever you called it under “SHARED” in the right column.

Click on it and it should load your entire iTunes library (this make take a while depending on how large it is).

If it starts loading but cancels after a few seconds, make sure that iTunes is running on the host computer.

That’s it, enjoy your music! :)