I hereby claim:
- I am ebeigarts on github.
- I am ebeigarts (https://keybase.io/ebeigarts) on keybase.
- I have a public key whose fingerprint is A14B 0A98 2061 C331 E4D8 C62B BD92 D3E2 0910 B700
To claim this, I am signing this object:
#!/bin/bash | |
exec >> /var/log/backup.log 2>&1 | |
set -ex | |
echo "post.sh" | |
date | |
if [ -e /tmp/dump.pids ]; then | |
for PID in `cat /tmp/dump.pids`; do |
#!/bin/bash | |
exec >> /var/log/backup.log 2>&1 | |
set -ex | |
/usr/local/avamar/etc/scripts/post.sh | |
echo "pre.sh" | |
date |
for APP in `dokku apps | grep -v '=====> My Apps'`; do | |
ID=$(cat /home/dokku/$APP/CONTAINER.web.1) | |
IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ID) | |
if [ ! -z $IP ]; then | |
echo " ---> $APP: $IP" | |
echo $IP > /home/dokku/$APP/IP.web.1 | |
dokku nginx:build-config $APP | |
fi | |
done |
require "i18n" | |
I18n.backend = I18n::Backend::KeyValue.new({}) | |
I18n.backend.store_translations(:en, { test: "Hello %{value}" }, escape: false) | |
module I18nSafeTranslations | |
def translate(*args) | |
super | |
rescue I18n::MissingInterpolationArgument => e | |
# Raven.capture_exception(e) # send to Sentry |
{{ range $port_map := .PROXY_PORT_MAP | split " " }} | |
{{ $port_map_list := $port_map | split ":" }} | |
{{ $scheme := index $port_map_list 0 }} | |
{{ $listen_port := index $port_map_list 1 }} | |
{{ $upstream_port := index $port_map_list 2 }} | |
server { | |
{{ if eq $scheme "http" }} | |
listen [::]:{{ $listen_port }} default_server; | |
listen {{ $listen_port }} default_server; |
if Rails.env.development? | |
ActionView::PathSet.class_eval do | |
private | |
alias_method :__find_all, :_find_all | |
def _find_all(*args) | |
t1 = Time.now | |
__find_all(*args) | |
ensure | |
t2 = Time.now | |
Thread.current["find_template_time"] ||= 0 |
I hereby claim:
To claim this, I am signing this object:
set :slack_webhook_url, "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXX" | |
namespace :slack do | |
task :deploy_started do | |
username = ENV['USER'] | |
on_rollback do | |
slack( | |
color: "danger", | |
message: "*#{username}* cancelled deployment of *#{application}* to *#{rails_env}*" |
PS4='+ $(date "+%s.%N") $BASH_SOURCE:$LINENO#$FUNCNAME \011 '
set -x
Example Output:
++ 1355955482.N ./.bashrc:11 source ./.rvm/scripts/rvm
+++ 1355955482.N ./.rvm/scripts/rvm:21 __rvm_has_opt posix
require "timeout" | |
RSpec::Matchers.define :become do |expected| | |
supports_block_expectations | |
match do |block| | |
begin | |
Timeout.timeout(Capybara.default_wait_time * 3) do | |
sleep(0.1) until (@actual = block.call) && @actual == expected | |
true |