Skip to content

Instantly share code, notes, and snippets.

@ssfinney
ssfinney / post-merge
Last active August 29, 2015 14:07 — forked from sindresorhus/post-merge
Composer install if composer.lock changes on merge from another branch
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# Modified by Stephen Finney
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
@ssfinney
ssfinney / Parking Calc Logic
Last active October 7, 2015 15:08 — forked from unruthless/gist:3184073
Parking Spot calculator logic
var qty_parking_spots,
square_feet,
qty_lubrication_or_service_bay,
qty_day_shift_employees;
// Automobile or machinery sales and service garages
// rule: 1 parking space for each 400 square feet of floor area
qty_parking_spots = floor(square_feet / 400);