This is probably not too helpful, since macOS Catalina has broken iTunes into an app for every media type, so the details of this post are mostly outdated if you’ve updated to Catalina. But I still have pre-Catalina (Mojave) on my MacBook Pro, and recently I searched and searched for an easy way to move… Continue reading Move iTunes Directories
Tag: bash
Yosemite Upgrade Changes Open File Limit
OSX has a ridiculously low limit on the maximum number of open files. If you use OSX to develop Node applications — or even if you just use Node tools like grunt or gulp — you’ve no doubt run into this issue. To address this, I have this line in my $HOME/.bash_profile: ulimit -n 1000000… Continue reading Yosemite Upgrade Changes Open File Limit
Easily prune your ssh known_hosts file
At some point, you’ve probably seen this message when you try to log in to one of your servers: This is really common when you have Amazon EC2 instances behind Elastic IPs because the IP address stays the same (and probably the hostname, too), but as new instances replace old instances, the new instances’ ssh… Continue reading Easily prune your ssh known_hosts file
New git alias: git last
I made a new git alias I’m loving. Maybe you have something similar. I’ve added this to my .gitconfig: [alias] last = rev-parse –abbrev-ref @{-1} This gets the name of the branch you had checked out prior to the current branch. It’s like git checkout -, but you can use it all over, such as:… Continue reading New git alias: git last
Using watch with a bash alias
I love the Unix watch command. On OSX, you can install it easily with Homebrew: brew install watch Something I didn’t realize until 10 minutes ago is that if you want to watch the output of something in your bash aliases, watch will complain because it cannot find the command. This is because watch evaluates… Continue reading Using watch with a bash alias
WordPress Update Bash Script
I wrote this script some time ago. It’s been working flawlessly for me, so I thought I’d share it here. It could use some progress messages, I suppose. #!/bin/bash DIR= # Put the file system path to your WordPress installation here. E.g., /var/www/html/blog TMPDIR=$HOME/tmp WPDIR=$TMPDIR/wordpress cd $TMPDIR rm -rf latest.zip ./wordpress # Clean up from… Continue reading WordPress Update Bash Script
Bash script: ted
I just wrote a little bash script, “ted” (for Tracking EDitor), which I am loving. You call ted like you would call your usual text editor, and ted backs up the file you’re editing, appending the originial timestamp as a suffix. Then, when you’re done editing the file, ted runs diff to keep a running… Continue reading Bash script: ted