Friday, December 5, 2014

Unix/Shell Script: Send a file to multiple subdirectories

Hey!

This was a fantastic piece of code, get a look.
It's the real deal if you want to send one file to multiple sequential subdirectories:


        printf "bomba_000%02i " $(seq 1 10) | xargs -n 1 cp puzzle.xml


Got this amazing solution from here: http://unix.stackexchange.com/questions/49011/copying-a-single-file-to-multiple-directories-using-cp

I'll probably update this to be a little bit more specific on generic names, but for now it's awesome.
Cheers.

Monday, December 1, 2014

Xcode/Project: How to make your Xcode project the hardcore way

Hey,

Get a reference here.
This dude teaches how to "bring back" the "Empty Project" template that we have in Xcode 5 and that for some stupid reason Apple preferred to focus on Storyboards.

Here it goes:
http://codefromabove.com/2014/09/xcode-6-removing-storyboards-and-creating-useful-empty-projects/

Cheers!

Wednesday, August 13, 2014

HTML/TextWrangler: Mind bomb grep function

Hey,

Quick note.
I'm not a web developer, but often I need to manipulate something that the source comes from the web. So today I needed to get a lista of names, but they came full of HTML mambo jumbo and I was like: "OMFG! How am I gonna get this done".

So after a quick Google search this dude, Art Upton, just gave it all the steps I needed:

1. Put you file to be stripped
2. Command+F
3. Selecte the "grep" tick box
4. Put this magical function on the "Find" field: </?[^>]*>
5. Press "Replace All"
6. BOOM! Magic.

Get a look on the source of the magic: http://bcdwp.web.tamhsc.edu/webmaster/2011/08/12/how-to-strip-html-code-using-grep-in-text-wrangler/
Tweet