Blog Archives

Monitoring a Drupal 8 Migration Executed with Drush

Update 2 is proving to be the most useful method. Update 1 Somehow I missed the documentation regarding the --feedback  argument for the drush mi  command. It’s similar to the methods below in that it helps you see that the migration is

Tagged with: , , ,
Posted in Development

Recursively Finding and Operating on the Largest n Number of Files of a Particular Type

If you want to reverse-engineer this, you can work from left to right, adding one command at a time to see what each step does to the output.

This example just lists the files we found, which is pointless

Tagged with: ,
Posted in Development

Delete Last Command from Bash History

If you’re like me, on occasion you accidentally (or sometimes purposefully) include a password in a command. Until recently I would execute history , find the offending command’s number, then do a history -d NUMBER . It is kind of a pain. The following

Tagged with: , , ,
Posted in 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