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}'"
}
This file contains 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
BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
git co master; | |
git pull --rebase; | |
git co $BRANCH; | |
git rebase master; | |
git push --force origin $BRANCH; |
This file contains 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
# This build script will build Ruby 2.0.0-p247. You will need su to | |
# root or sudo as required. | |
# This build tested against Debian 7.0 64-bit arch, installed from net-inst image. | |
# These aren't specifically Ruby deps; more for building software in general | |
# (you probably already have them) | |
apt-get install -y build-essential autoconf | |
# These deps will support common libraries like yaml and give you the best irb experience. |
This file contains 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 | |
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 |
This file contains 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
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 |
#!/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 is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.
- opencv
- scrot
- findimage
- xdotool
This file contains 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
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost:8080/_search?q=* | |
# | |
# is rewritten to: | |
# |
OlderNewer