Removing “@2x” substring from files

If you’re reading this, probably… it’s because the Art Designers of your team just sent you a bunch of SD assets, with the @2x substring… and you don’t wanna spend the next 30 minutes cleaning that up… right?

If that’s the case, you’ve come to the right place. Fire Terminal, open the containing folder, and type the following:

find . -type f -name "*@2x*" -exec sh -c 'echo mv "$0" "${0/@2x/}"' '{}' \;


Note:
you might have just noticed that this will actually echo the replacement. That’s for safety. Validate the output, and proceed removing the ‘echo’ command call.

Fixing Codesign Issues with Helper Apps

I’ve been getting “Invalid binary” errors, while trying to upload a binary to the AppStore. The solution can be found in stackoverflow, i’m just pasting it here, for future reference…

1. Re-Codesign the Helper app from terminal:

codesign -f -s "3rd Party mac Developer Application:" -i "com.bundle.YOUR.HELPER" --entitlements path/to/helper/entitlements YOUR-HELPER.app

2. 

Remove provisioning profile from Helper app, adding a “Run script” into the “Build Phases”:

rm "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Library/LoginItems/YOUR-HELPER.app/Contents/embedded.provisionprofile"

After this, i managed to upload the binary!

 

OSX: Fixing SSH hangs!

This glitch is pretty annoying. You’re following a log, while connected to a server (through ssh), and after a while, your ssh connection hangs.
The solution?.

Fire up Terminal, and type the following: nano ~/.ssh/config

Once there, fill up the following:

ServerAliveInterval 300
ServerAliveCountMax 120

That should keep your connection alive for the next 10 hours, without further issues.

Fixing SVN hangs on OSX

I’m writing this, right here, so i know where to pick it up next time i get the same issue. Thanks to Jonathan, who wrote this awesome post, and saved me quite a lot of time.

Long short story, it seems there is a buggy library on OSX, that produces broken SSL connections to hang for quite some time. Workaround?

sudo port install neon

That should upgrade the faulty library, and fix this annoying issue.

Install Lynx on Max OSX

This task is pretty straightforward. At least if you already’ve got MacPorts installed.
(If you don’t have macports, please, head on to this website and get it, it’s extremely useful to geeky users).

Let’s proceed.!. Open a Terminal window, and type the following command

sudo port install lynx

That’d be all. To test Lynx, type the following:

lynx www.lantean.co

If everything went fine, you should see something like this:
Lynx Mac