Blog Archives

Triggers in iTerm – Watching For Specific Strings

I was recently performing a git-add in patch mode (  git add -p ) as I normally do, and realized there were a few lines I needed to make sure I didn’t commit. These lines were sandwiched between other lines that I did want

Tagged with: , , , , ,
Posted in Development, Tech Tips

Customizable Date variables in Keyboard Maestro

UPDATE: Though the solution below works well, I do recommend following the first commenter’s advice and using the ICUDateTime text tokens instead, which allow you to use any ICU date format, without having to invoke a shell script. Sometimes you need

Tagged with: , ,
Posted in Tech Tips

Determining Your Most Used Commands in Terminal

I’m always looking to automate things using Alfred, Keyboard Maestro, Text Expander, and Python. I was curious which terminal commands I use most often, so I did some experimenting. Basically I wanted to know how many times I’ve executed each

Tagged with: , , ,
Posted in Tech Tips

“755”-style permissions with ‘ls’

After a quick Google search for “ls permissions octal” I found a very handy alias to put in my .bashrc. Not only is it handy to see the OCTAL value of the permissions for each file/dir, it will undoubtedly help

Tagged with: , , , ,
Posted in Tech Tips

Automatically Stage All Deleted Files (Git)

Tab-completion is a really nice thing that we often take for granted. While working with Git I’ve found that it becomes inconvenient to stage (add for inclusion in the next commit) removed files using git rm path/to/my/file.php. Tab completion doesn’t

Tagged with: , , ,
Posted in Development

Automatically Change Links from Absolute to Relative

In this example I’m showing one way to quickly convert all a href and img src paths from absolute to relative. It’s quite a time saver, but I suggest committing your latest changes before trying anything here! If you aren’t

Tagged with: , , , , ,
Posted in Development