git (private server)
Alternative: github
Cashboard
| * { | |
| -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ | |
| -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ | |
| -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ | |
| -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ | |
| margin: 0; | |
| padding: 0; | |
| border: 0; | |
| } |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>DVTConsoleDebuggerInputTextColor</key> | |
| <string>0 0 0 1</string> | |
| <key>DVTConsoleDebuggerInputTextFont</key> | |
| <string>Menlo-Bold - 11.0</string> | |
| <key>DVTConsoleDebuggerOutputTextColor</key> | |
| <string>0 0 0 1</string> |
| # Run me with: | |
| # | |
| # $ watchr plugins.watchr.rb | |
| # -------------------------------------------------- | |
| # Convenience Methods | |
| # -------------------------------------------------- | |
| def run(cmd) | |
| puts(cmd) | |
| system(cmd) |
| # See: http://stackoverflow.com/questions/1226302/how-to-monitor-delayedjob-with-monit/1285611 | |
| check process delayed_job with pidfile /full/path/to/app/shared/pids/delayed_job.pid | |
| start program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job start'" | |
| stop program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job stop'" |
| require 'mysql2' | |
| require 'mysql2/em' | |
| class MysqlConnectionPool | |
| def initialize(conf) | |
| @pool_size = conf[:size] || 10 | |
| @connections = [] | |
| @query_queue = EM::Queue.new | |
| start_queue conf |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
| require "rvm/capistrano" | |
| # REPLACE this below with your ruby version/gemset version: YOUR_RUBY_VERSION@YOUR_GEM_SET | |
| set :rvm_ruby_string, 'ruby-1.9.2-p136@example_gemset' | |
| set :use_sudo, false | |
| set :stages, %w(production staging) | |
| set :default_stage, "staging" | |
| require 'capistrano/ext/multistage' |
| >> dates | |
| => [#<Date: 2011-07-01 (4911487/2,0,2299161)>, #<Date: 2011-07-20 (4911525/2,0,2299161)>] | |
| >> Date.today - dates.map { |d| Date.today - d }.map(&:to_f).inject { |sum, diff| sum + diff } / dates.length | |
| => #<Date: 2011-07-10 (2455753.0,0,2299161)> | |
| >> |
| #!/usr/bin/ruby | |
| require 'stringio' | |
| module AB | |
| class Response | |
| class << self | |
| def parse_string(string) | |
| new.tap {|res| res.parse_string(string) } | |
| end |
| # redMine - project management software | |
| # Copyright (C) 2008 Jean-Philippe Lang | |
| # | |
| # This program is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU General Public License | |
| # as published by the Free Software Foundation; either version 2 | |
| # of the License, or (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |