This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Set up Rails app. Run this script immediately after cloning the codebase. | |
| # Exit if any subcommand fails | |
| set -e | |
| # Copy over configs | |
| if ! [ -f .env ]; then | |
| cp .sample.env .env |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # if you want to render flamegraphs | |
| gem "stackprof", require: false # required by flamegraph | |
| gem "flamegraph", require: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module FactoryGirl | |
| module Doctor | |
| module FloatDuration | |
| refine Float do | |
| def duration | |
| t = self | |
| format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000) | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [port]: | |
| 1. Install Xcode-Beta from https://developer.apple.com/xcode/downloads/ | |
| 2. ➜ sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer/ | |
| 3. ➜ sudo xcodebuild -license | |
| 4. ➜ sudo port clean install | |
| [brew]: | |
| ➜ cd `brew --repository` | |
| ➜ git reset --hard FETCH_HEAD | |
| ➜ sudo chown -R `whoami` `brew --prefix` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| churn number and file name | |
| git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | |
| churn number and file name w/ limiting to last n commits | |
| git log --all -n 5000 -M -C --name-only | grep -E '^spec/models' | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | |
| graph of churn number and frequency | |
| git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk '{print $1}' | uniq -c | sort | awk 'BEGIN { print "frequency,churn_count"} { print $1,$2}' | |