$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.
set :application, `basename $(pwd)`.chomp
set :commit_sha, `git rev-parse --short "HEAD"`.chomp
set :default_environment, {
"RATIONALE_CLIENT" => "capistrano",
"RATIONALE" => "'Deploying #{application} #{commit_sha}'"
}
#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.
No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!
I chose [pgloader
][1] because it's extremely fast. YMMV.
mysql2
gem with pg
in Gemfile
.config/database.yml
for PostgreSQL. I used [Rails' template][2] as a starting point.#!/bin/sh | |
logger "SSH COMMAND is $SSH_ORIGINAL_COMMAND" | |
if test -n "$SSH_ORIGINAL_COMMAND" -a parse_to_allow($SSH_ORIGINAL_COMMAND) ; then | |
/bin/bash -c "$SSH_ORIGINAL_COMMAND" | |
else | |
logger "shell access denied" | |
fi |
IT'S SHOWTIME | |
HEY CHRISTMAS TREE isLessThan100 | |
YOU SET US UP @NO PROBLEMO | |
HEY CHRISTMAS TREE n | |
YOU SET US UP 0 | |
HEY CHRISTMAS TREE multiple | |
YOU SET US UP @NO PROBLEMO | |
STICK AROUND isLessThan100 |
require 'resque/tasks' | |
namespace :resque do | |
def del(key) | |
Resque.redis.keys(key).each { |k| Resque.redis.del(k) } | |
end | |
desc "Resque setup according to installation guide" | |
task :setup => :environment |