Some CoffeeScript (verbosely commented for clarity)
# Override Rails handling of confirmation
$.rails.allowAction = (element) ->
# The message is something like "Are you sure?"
message = element.data('confirm')
# parses out the current branch you're on. See: http://www.harukizaemon.com/2008/05/deploying-branches-with-capistrano.html | |
current_branch = `git branch`.match(/\* (\S+)\s/m)[1] | |
# use the branch specified as a param, then use the current branch. If all fails use master branch | |
set :branch, ENV['branch'] || current_branch || "master" # you can use the 'branch' parameter on deployment to specify the branch you wish to deploy |
Generated with workflows2md.
# This monkey patches the PostgreSQL adapter to use asynchronous | |
# communication when doing its "SELECT 1" check for is-connection-active. | |
# One symptom of this problem is stalled processing queues in Sidekiq. | |
# See also: | |
# | |
# https://github.com/rails/rails/issues/12867 | |
# | |
# At the time of writing we have seen indefinite blocking down in the C | |
# library's "poll()" method due to the out-of-box Rails code using blocking | |
# I/O, in multithreaded environments - one thread gets stuck in the I/O and |
#!/bin/bash | |
iatest=$(expr index "$-" i) | |
####################################################### | |
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
####################################################### | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |
launchctl load local.pbcopy.9999.plist
. This must remain running for remote copy to work.cat "message or file" | nc localhost 9997 -w1