Prettify JSON output from the command line

to show formatted JSON and basic linting:
echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool

GitHub-Pivotal Tracker commit format

Easy integration to change status on Pivotal Tracker when using GitHub. After sync’ing the services via API key, you can use the format:

[Delivers #12345679]

verbs include:
started, fixed, completed, finished, delivered.

see: https://www.pivotaltracker.com/help/api?version=v5

The minimum commit message string that will allow Tracker to associate a /source_commits POST with a story and create a comment is a single story ID enclosed in square brackets: ‘[#12345678]‘. A more typical message, indicating that one commit completes two stories (which need not be in the same Tracker project), might look like this: ‘finally [finished #12345678 #12345779], fixes client/server integration glitch’

If an included story was not already started (it was in the “not started” state), an update to that story from /source_commits that doesn’t contain any other state-change information will automatically start the story.

To automatically finish a story by using a commit message, include “fixed”, “completed”, or “finished” in the square brackets in addition to the story ID. You may use different cases or forms of these verbs, such as “Fix” or “FIXES”, and they may appear before or after the story ID.

Git: show files just merged

git log -m --name-only

Post-Mac Mavericks install tasks

stuff I needed to do in order to restore some functionality once updating to Mavericks.

(Uses native apache/php with homebrew supplements, no MAMP or similar packages required.)

here we go:


* update .bash_profile in ~/
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc

$ xcode-select --install

* You will then be asked whether you want to install Xcode or 
    the command line developer tools, with the latter being the default.

* install Homebrew:
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

* install some utils:
$ brew install bash-completion ssh-copy-id wget

* install mysq
$ brew install mysql --enable-local-infile

# To have launchd start mysql at login:
#    $ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
# Then to load mysql now:
#   $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
# Or, if you don't want/need launchctl, you can just run:
#   $ mysql.server start
#
#   $ mysql_secure_installation

$ sudo mkdir /var/mysql
$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

* php myadmin:
$ brew tap homebrew/dupes
$ brew tap josegonzalez/homebrew-php
$ brew install phpmyadmin

$ sudo cp /usr/local/share/phpmyadmin/config.sample.inc.php \ 
    /usr/local/share/phpmyadmin/config.inc.php

* PHP
#  no problems as of yet. was able to compile extensions with brew and link those
#  to the native Apache/PHP setup via php.ini
$ sudo cp /etc/php.ini.default /etc/php.ini
    # and merge previous php.ini
# Zend Opcache seems to be more stable than APC:
$ brew install php54-opcache
    # copy/link .so file and update php.ini

* redis:
$ brew install redis
* phpredis:
$ brew install php54-redis
    # copy/link .so file and update php.ini

* Apache
#  was generally fine, might need to change some perms, particularly if
#  putting web directories under your home folder, e.g., Dropbox.
#  this fixed that: (you could update your groups theoretically to avoid
#  setting the search (+x) permission for "other".
$ sudo chmod -R g+x Dropbox/
$ sudo chmod -R o+x Dropbox/

Git Tip: How to “Merge” Specific Files from Another Branch

Git Tip: How to “Merge” Specific Files from Another Branch

basically:
git checkout source_branch <paths>...

then commit.

also look into adding –patch or –merge to checkout:
http://git-scm.com/docs/git-checkout

Turn off auto link checker in CQ5

Adobe’s CQ5/AEM link checker can result in some unexpected results, particularly if all your URLs are not well-formed (e.g., Ajax or other non-standard links). To turn it of (or otherwise manage the behavior), go to:

http://localhost:4502/system/console/configMgr (update domain/port as needed), then search for: Day CQ Link Checker Transformer and either disable or edit config.

« Previous Entries