Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
| Capybara.register_driver :chrome do |app| | |
| Capybara::Selenium::Driver.new(app, | |
| browser: :chrome, | |
| desired_capabilities: { | |
| "chromeOptions" => { | |
| "args" => %w{ window-size=1024,768 } | |
| } | |
| } | |
| ) | |
| end |
| # Rack middleware that reads environment variable HOST (value such as: app.example.com) | |
| # to override request Host headers, forcing the app to use this value for URLs & redirects. | |
| # | |
| # If env var HOST is unset, then this middleware does nothing. | |
| # | |
| # Useful for when a Rails app is the origin behind a CDN/proxy, so that all generated | |
| # URLs point to the canonical hostname of the CDN, and not the origin itself. | |
| # | |
| # For a Rails app, | |
| # - save this file in config/initializers/set_default_host.rb |
| Action & Adventure based on a book from the 1960s (4082) | |
| Action & Adventure based on a book from the 1970s (2410) | |
| Action & Adventure based on a book from the 1980s (704) | |
| Action & Adventure based on real life from the 1980s (1051) | |
| Action & Adventure directed by Andrew V. McLaglen (2282) | |
| Action & Adventure directed by Cirio H. Santiago (4323) | |
| Action & Adventure directed by Clint Eastwood (4998) | |
| Action & Adventure directed by Corey Yuen (291) | |
| Action & Adventure directed by George Archainbaud (3183) | |
| Action & Adventure directed by George Sherman (3198) |
| #!/bin/bash | |
| set -u | |
| echo "Checking for response status ${1} from URL: ${2}" | |
| try_count=0 | |
| while true | |
| do | |
| ((try_count++)) | |
| response_status="$(curl -s -o /dev/null -w "%{http_code}" "${2}")" | |
| if [ "$response_status" == "${1}" ] |
| ## Global install of the app generator | |
| npm install -g create-react-app | |
| ## Setup the app (first-time only) | |
| create-react-app my-app | |
| cd my-app | |
| git init | |
| # Create the Heroku app; requires free account at https://www.heroku.com/ | |
| heroku create -b https://github.com/heroku/heroku-buildpack-static.git |
| [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
| function parse_git_dirty { | |
| git diff --quiet || echo " ▲ " | |
| } | |
| function parse_git_branch { | |
| e=`echo $( { git status; } 2>&1 ) | tr '[:upper:]' '[:lower:]'` | |
| if [[ ! $e =~ 'not a git repository' ]] | |
| then git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)] /" | |
| fi |
| require 'yaml' | |
| require 'pathname' | |
| require 'active_support/all' | |
| def convert(f) | |
| filename = Pathname.new(f) | |
| yaml = YAML.load_file(filename) | |
| name = filename.basename('.yml').to_s | |
| File.write(filename, { |
| /* | |
| Filepicker lib must be loaded from script tag in HTML: | |
| <script type="text/javascript" src="//api.filepicker.io/v2/filepicker.js"></script> | |
| */ | |
| class FilepickerInput extends React.Component { | |
| componentDidMount() { | |
| const filepickerElement = this.refs.filepicker; | |
| if (typeof filepicker !== 'undefined') { | |
| // Single-page app integration: https://developers.filepicker.com/docs/support/integration/117 |
| module.exports = { | |
| WEBPACK_ENV: JSON.stringify('development'), | |
| FOO: JSON.stringify('per-environment foo value') | |
| }; |