Repeating commands in bash: per line, per word, and xargs

In bash (the default shell on Mac), today we wanted to execute a command over each line of some output, separately. We wanted to grep (aka search) for some text in a file, then count the characters in each matching line. For future reference… Perform a command repeatedly, once per line of input: grep “the” … Read moreRepeating commands in bash: per line, per word, and xargs

Stupid git tricks: transferring part of one git repo to another

Reference post. Don’t expect this to be interesting. We had a particular subdirectory of a repository (repoA) that really belonged in repoB. The goal is to transfer all files and history from repoA to repoB, permanently. Thanks to Nikolai in this blog post, the move isn’t too bad. I’m not going to repeat his instructions. … Read moreStupid git tricks: transferring part of one git repo to another

Setting up an Android project in IntelliJ Idea

And there was pain… I imported an existing Android project into IntelliJ Idea Community Edition 10.5.1. Some things started complaining “Please select Android SDK.” The help pages are out of date; they say to do this in the Android facet settings. It isn’t there. Here is the secret do-things-right button: Module settings (ctrl-alt-shift-S), then pick … Read moreSetting up an Android project in IntelliJ Idea