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 osascript | |
(* | |
Script to set a HTML email signature in Mail.app | |
Before doing anything the script will: | |
* Check that the os version is 10.10 | |
* There is at least 1 Mail account | |
If either of these checks fails the script will exit | |
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
# | |
# Manually set the contents of an encrypted session cookie | |
# | |
# Uses the same encryption keys as the Rails app using devise | |
# | |
# Based off http://big-elephants.com/2014-01/handling-rails-4-sessions-with-go/ | |
# Verified against https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/cookies.rb | |
# | |
class TestSession |
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
no_namespace_redis = Sidekiq::RedisConnection.create({ url: ENV['REDISCLOUD_URL'] }) | |
namespace_redis = Sidekiq::RedisConnection.create({ url: ENV['REDISCLOUD_URL'], namespace: "#{ENV['SIDEKIQ_NAMESPACE'] || Rails.env}" }) | |
Sidekiq.instance_variable_set "@redis", no_namespace_redis | |
Sidekiq::Stats.new.queues | |
queue_names = Sidekiq::Stats.new.queues.select {|k,v| v.to_i > 0 }.keys | |
puts "Queue Names: #{queue_names.inspect}" |