This file contains hidden or 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
| # adapted from bin/sidekiq | |
| # to invoke, run: zeus runner sidekiq.rb | |
| require 'sidekiq/cli' | |
| begin | |
| cli = Sidekiq::CLI.instance | |
| cli.parse | |
| cli.run | |
| rescue => e |
This file contains hidden or 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
| /** | |
| * Overwrites default Mousetrap.bind method to optionally accept | |
| * an object to bind multiple key events in a single call | |
| * | |
| * You can pass it in like: | |
| * | |
| * Mousetrap.bind({ | |
| * 'a': function() { console.log('a'); }, | |
| * 'b': function() { console.log('b'); } | |
| * }); |
This file contains hidden or 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
| { | |
| "template": "logstash-*", | |
| "settings" : { | |
| "number_of_shards" : 1, | |
| "number_of_replicas" : 0, | |
| "index" : { | |
| "query" : { "default_field" : "@message" }, | |
| "store" : { "compress" : { "stored" : true, "tv": true } } | |
| } | |
| }, |
This file contains hidden or 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 is an example of how to use database_cleaner gem and | |
| # RSpec tags to make `after_commit` hook play nice with | |
| # `use_transactional_fixtures`. | |
| # Simply mark the specs that use after_commit with | |
| # `:uses_after_commit` tag. | |
| # ... | |
| require 'database_cleaner' |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
This file contains hidden or 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
| module SoftDelete | |
| extend ActiveSupport::Concern | |
| included do | |
| define_model_callbacks :soft_delete | |
| define_model_callbacks :recover | |
| default_scope where(:deleted_at => nil) | |
| class_eval do | |
| class << self | |
| alias_method :with_deleted, :unscoped |
This file contains hidden or 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
| Copyright (C) 2011 by Colin MacKenzie IV | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in |
This file contains hidden or 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
| # configuration for osx clipboard support | |
| set-option -g default-command "reattach-to-user-namespace -l sh" |