Tuesday, November 23, 2010
Wednesday, November 17, 2010
DRY is more than just not repeating code.
DRY says that every piece of system knowledge should have one authoritative, unambiguous representation. Every piece of knowledge in the development of something should have a single representation. A system's knowledge is far broader than just its code. It refers to database schemas, test plans, the build system, even documentation.
Given all this knowledge, why should you find one way to represent each feature? The obvious answer is, if you have more than one way to express the same thing, at some point the two or three different representations will most likely fall out of step with each other. Even if they don't, you're guaranteeing yourself the headache of maintaining them in parallel whenever a change occurs. And change will occur. DRY is important if you want flexible and maintainable software.
-- Dave Thomas
Thursday, November 4, 2010
How to change auto-save-list directory in emacs
;; Put auto-save-list somewhere else
(set 'auto-save-list-file-prefix "~/.trash/.saves-")
Monday, November 1, 2010
Ignore changes to a file in Git
To start tracking changes to the file again, run:git update-index --assume-unchanged filename
git update-index --no-assume-unchanged filename
source: http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html
Make mouse pointer disappear with unclutter
unclutter -idle 1 -noevents &
Revert a file in Git
To revert a file with uncommitted changes to the current version in the repo do:
git checkout -- filename
source: http://norbauer.com/notebooks/code/notes/git-revert-reset-a-single-file