type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| #!/usr/bin/env bash | |
| # This script clones all repos in a GitHub org | |
| # It requires the GH CLI: https://cli.github.com | |
| # It can be re-run to collect new repos and pull the latest changes | |
| set -euo pipefail | |
| USAGE="Usage: gh-clone-org <user|org>" |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
| #!/usr/bin/env bash | |
| # | |
| # Rails console script that can be run on AWS Elastic Beanstalk. | |
| # | |
| # Run this script from the app dir (/var/app/current) as root (sudo script/aws-console) | |
| # | |
| set -xe | |
| EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) |
| #!/usr/bin/env ruby | |
| # Heroku enviroment helper script | |
| # | |
| # This is to streamline using differnt heroku enviroments from one repo. | |
| # Symlink this file to an envroment name (as set by the git-remote name), then | |
| # when running that symlink the script will look up the name in the git config | |
| # and use that remote as the heroku name. | |
| # | |
| # Setup: |
| require 'fakeweb' | |
| require 'fake_resource' | |
| ActiveResource::Base.send :include, ActiveResource::FakeResource | |
| Before do | |
| FakeWeb.allow_net_connect = false | |
| end | |
| After do |scenario| | |
| ActiveResource::FakeResource.clean |
| worker_processes 3 # amount of unicorn workers to spin up | |
| timeout 30 # restarts workers that hang for 30 seconds | |
| preload_app true | |
| GC.respond_to?(:copy_on_write_friendly=) and | |
| GC.copy_on_write_friendly = true | |
| before_fork do |server,worker| | |
| defined?(ActiveRecord::Base) and |
| # A Basic API Controller for Rails | |
| # Handles authentication via Headers, params, and HTTP Auth | |
| # Automatically makes all requests JSON format | |
| # | |
| # Written for production code | |
| # Made public for: http://broadcastingadam.com/2012/03/state_of_rails_apis | |
| # | |
| # Enjoy! | |
| class ApiController < ApplicationController |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)