I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| CHECKING_OUT_BRANCH=$3 | |
| OLD_BRANCH=$1 | |
| NEW_BRANCH=$2 | |
| if [ $CHECKING_OUT_BRANCH -eq 1 ] | |
| then | |
| FILES_CHANGED=`git diff $OLD_BRANCH $NEW_BRANCH --name-status` | |
| MIGRATIONS_REMOVED=`echo "$FILES_CHANGED" | egrep 'D\tdb/migrate/([0-9]+)' | sort -r` | |
| MIGRATIONS_ADDED=`echo "$FILES_CHANGED" | egrep 'A\tdb/migrate/([0-9]+)'` | |
| CHECKING_OUT_BRANCH=$3 | |
| OLD_BRANCH=$1 | |
| NEW_BRANCH=$2 | |
| if [ $CHECKING_OUT_BRANCH -eq 1 ] | |
| then | |
| FILES_CHANGED=`git diff $OLD_BRANCH $NEW_BRANCH --name-status` | |
| MIGRATIONS_REMOVED=`echo "$FILES_CHANGED" | egrep 'D\tdb/migrate/([0-9]+)' | sort -r` | |
| MIGRATIONS_ADDED=`echo "$FILES_CHANGED" | egrep 'A\tdb/migrate/([0-9]+)'` | |
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install postgresql@9.6 | |
| brew unlink postgresql@9.6 | |
| brew link postgresql |
| # Given a multiline script, this will wrap the script in a function and then | |
| # call it so Capybara's evaluate_script knows how to get the return value properly. | |
| # By default, Capybara just prepends a 'return ' to your script. | |
| # | |
| # Usage: | |
| # | |
| # value = page.evaluate_multiline_script %{ | |
| # var foo = []; | |
| # $('li').each(function(i, li) { | |
| # foo[foo.length] = $(li).text(); |
| module Rack | |
| # disable CSS3 and jQuery animations in test mode for speed, consistency and avoiding timing issues. | |
| # Usage for Rails: | |
| # in config/environments/test.rb | |
| # config.middleware.use Rack::NoAnimations | |
| class NoAnimations | |
| def initialize(app, options = {}) | |
| @app = app | |
| end |
| alias rdm="git diff master --name-only --diff-filter=ACMR | grep '.rb' | ag -v 'schema' | xargs rubocop" |
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?w=files&flid=15801) | |
| Google Apps for Android 4.3 (http://goo.im/gapps/gapps-jb-20130813-signed.zip) | |
| Google Apps for Android 4.2 (http://goo.im/gapps/gapps-jb-20130812-signed.zip) | |
| Google Apps for Android 4.1 (http://goo.im/gapps/gapps-jb-20121011-signed.zip) | |