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
| set :deploy_via, :copy | |
| set :copy_cache, true | |
| set :copy_exclude, [".git/*", ".svn/*"] | |
| set :copy_strategy, :export | |
| set :repository, Dir.pwd |
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
| { scopeName = 'source'; | |
| comment = ' | |
| You will need to add a { include = "source"; } within the patterns = (...) segment of each of your languages. | |
| Eugh! | |
| '; | |
| patterns = ( | |
| { name = 'source.invalid.trailing-whitespace'; | |
| match = '\S(\s{1,})$'; | |
| captures = { 1 = { name = 'invalid.trailing-whitespace'; }; }; | |
| }, |
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
| { scopeName = 'source'; | |
| patterns = ( | |
| { name = 'source.invalid.trailing-whitespace'; | |
| match = '\S(\s{1,})$'; | |
| captures = { 1 = { name = 'invalid.trailing-whitespace'; }; }; | |
| }, | |
| { name = 'source.invalid.just-whitespace'; | |
| match = '^(\s{1,})$'; | |
| captures = { 1 = { name = 'invalid.trailing-whitespace'; }; }; |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| gem "beanstalk-client" | |
| require "beanstalk-client" | |
| port = ARGV.last or raise "GIVE ME A PORT NEXT TIME!" | |
| beanstalk = Beanstalk::Pool.new(["0.0.0.0:#{port}"]) | |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| gem "beanstalk-client" | |
| require "beanstalk-client" | |
| port = ARGV.last or raise "GIVE ME A PORT NEXT TIME!" | |
| beanstalk = Beanstalk::Pool.new(["0.0.0.0:#{port}"]) | |
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
| <<-BUMBLEBEE | |
| The bumblebee hovers around an object, | |
| looking for a flower with some pollen. | |
| It goes from flower to flower, | |
| trying each method in order, | |
| and when it finds one that isn't empty, | |
| it returns it to the hive. | |
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
| namespace :deployment do | |
| desc "Mark the deployment as locked, preventing further deployments (until deployment:unlock)" | |
| task :lock, :roles => :app do | |
| run "touch -f #{shared_path}/locked" | |
| end | |
| desc "Unmark the deployment as locked, allowing further deployments (until deployment:lock)" | |
| task :unlock, :roles => :app do | |
| run "rm #{shared_path}/locked" | |
| end |
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
| #!/usr/bin/env ruby | |
| gem 'mbleigh-ruby-github' | |
| require "ruby-github" | |
| unless username = ARGV.first and username =~ /[a-zA-Z0-9]+/ | |
| puts "Usage: #{$0} <github_username>" | |
| exit(1) | |
| end | |
| BASE_PATH=File.expand_path("./repos") |
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
| # t(:foo) now looks for admin.blog_controller.foo, then if not found it then goes for admin.foo, then finally just foo. | |
| def ApplicationController.has_controler_specific_translation_helper_fu | |
| def t(key, options = {}) | |
| controller_name = self.controller_name + "_controller" | |
| defaults = [[:admin, controller_name, key], [:admin, key], [key]].map{|a| a.join(".").to_sym} | |
| key, defaults = *defaults | |
| options[:default] = defaults | |
| I18n.t(key, options) | |
| end | |
| helper_method :t |
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
| require 'drb' | |
| module RemoteRunner | |
| module Runner | |
| def eval(code) | |
| Kernel.eval(code) | |
| end | |
| end | |
| def load_app(app) |