Running Multiple PHP Versions with Homebrew in OS X

Submitted by michael on Tue, 12/05/2017 - 18:54
Update: None of this will work now. Homebrew has changed all of the PHP formulas and removed a bunch of stuff. Assuming you have xcode and homebrew installed and running, follow these steps. This setup will use the system Apache web server, but not the system PHP. Adjust your unix PATH environment variable to point to homebrew's bin and sbin directories in ~/.profile export PATH=/usr/local/sbin:/usr/local/bin:$PATH Add the php tap to homebrew, so it can find the various parts. brew update brew upgrade brew tap homebrew/php Start by installing php56.

Signing a Java Jar

Submitted by michael on Sat, 10/21/2017 - 15:09
Blogging this because it took far too long to figure out and because the documentation is spread across too many pages and isn't at all clear.

Generate some signing keys.

keytool -genkeypair  -alias USERNAME  -validity 1000  -keystore FILENAME.keystore Answer some questions. The resulting FILENAME.keystore file must be kept private. This generates a key that's valid for at least 1000 days.

Run tests when they are saved

Submitted by michael on Fri, 02/20/2015 - 16:40
Python's watchdog module includes watchmedo, a command that watches files or directories. I like to use it to automatically run a test when the test is saved: [shell] $ watchmedo shell-command \ --patterns="*.py" \ --recursive \ --command='echo "${watch_src_path}"; python "${watch_src_path}"' \ tests/ [/shell]