Those snippets of codes that are useful to know.

grep is wonderful. I needed to search a folder and all its subfolders for a function name. It was easy cheese with grep. You go

grep [text you searching for] -R [the folder you're searching]

And awesome sauce!

oh gosh. Story.
So, while working on the submission system, I've found that my predecessors loved to have copies of like the css stylesheets in their different directories. These copies are almost exactly the same, but have been tweaked ever-so-slightly for their different locations.
A maintenance nightmare, yes.

So I wanted to combine them. But of course, if I tried to, I'd lose some of the little tweaks and new styles that have been added for the different parts of the site.

Enter diff. I've already met a reincarnation of this in svn, the great svn diff, awesomely perfect to compare your working copy of a file to the version in svn, or comparing over multiple versions.

With the unix command, diff, I can do something like
diff [file1] [file2] >et; [untakenFileName]

The results of diff get spat out into untakenFileName. TextMate surprised me with having syntax highlighting for diff files, and I'm sure others do too.

Makes life slightly easier.

[View 0 Comments] [Post a comment]