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
# encoding: utf-8 | |
require "openssl" | |
require "base64" | |
CIPHER_ALGO = "AES-256-CBC" | |
SALT_SIZE = 8 | |
def encrypt(data, pass) | |
salt = OpenSSL::Random.random_bytes(SALT_SIZE) |
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
#!/usr/bin/env bash | |
# | |
# Scans the given path(s) and converts shoulda syntax to expectations and | |
# upgrades rspec 3 syntaxes. | |
# | |
# Examples | |
# | |
# $ rspec2to3 spec/lib/**/*_spec.rb | |
files="${@}" |
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
<!-- previous lines omitted --> | |
<cluster-connections> | |
<cluster-connection name='my-cluster-topics'> | |
<address>jms.topic</address> | |
<connector-ref>netty</connector-ref> | |
<discovery-group-ref discovery-group-name='dg-group1'/> | |
<retry-interval>500</retry-interval> | |
<retry-interval-multiplier>1.5</retry-interval-multiplier> | |
<max-retry-interval>4000</max-retry-interval> | |
<reconnect-attempts>-1</reconnect-attempts> |
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
# Rake task to launch multiple Resque workers in development/production with simple management included | |
require 'resque/tasks' # Require Resque tasks | |
namespace :workers do | |
# = $ rake workers:start | |
# | |
# Launch multiple Resque workers with the Rails environment loaded, | |
# so they have access to your models, etc. |