First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
#!/usr/bin/env ruby | |
# | |
# A quick script to dump an overview of all the open issues in all my github projects | |
# | |
require 'octokit' | |
require 'awesome_print' | |
require 'rainbow' |
First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
49 def deprecate name, repl, year, month | |
50 class_eval { | |
51 old = "_deprecated_#{name}" | |
52 alias_method old, name | |
53 define_method name do |*args, &block| # TODO: really works on 1.8.7? | |
54 klass = self.kind_of? Module | |
55 target = klass ? "#{self}." : "#{self.class}#" | |
56 msg = [ "NOTE: #{target}#{name} is deprecated", | |
57 repl == :none ? " with no replacement" : ", use #{repl}", | |
58 ". It will be removed on or after %4d-%02d-01." % [year, month], |
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
set :sync_directories, ["public/system/images"] | |
set :sync_backups, 3 | |
set :db_file, "mongoid.yml" | |
set :db_drop, '--drop' # drop database (rewrites everything) |
gem "minitest" | |
require "minitest/spec" | |
require "minitest/autorun" | |
require "active_model" | |
require "turn" | |
require "shoulda-matchers" | |
class MiniTest::Unit::TestCase | |
include Shoulda::Matchers::ActiveModel | |
extend Shoulda::Matchers::ActiveModel |
doctype html | |
/[if lt IE 7] | |
| <html class="ie6"> | |
/[if IE 7] | |
| <html class="ie7"> | |
/[if IE 8] | |
| <html class="ie8"> | |
/[if IE 9] | |
| <html class="ie9"> | |
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]--> |
// Generates a URL-friendly "slug" from a provided string. | |
// For example: "This Is Great!!!" transforms into "this-is-great" | |
function generateSlug (value) { | |
// 1) convert to lowercase | |
// 2) remove dashes and pluses | |
// 3) replace spaces with dashes | |
// 4) remove everything but alphanumeric characters and dashes | |
return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, ''); | |
}; |
SC._detectBrowser = function(userAgent, language) { | |
var version, webkitVersion, browser = {}; | |
userAgent = (userAgent || navigator.userAgent).toLowerCase(); | |
language = language || navigator.language || navigator.browserLanguage; | |
version = browser.version = (userAgent.match(/.*(?:rv|chrome|webkit|opera|ie)[\/: ](.+?)([ \);]|$)/) || [])[1]; | |
webkitVersion = (userAgent.match(/webkit\/(.+?) /) || [])[1]; | |
browser.windows = browser.isWindows = !! /windows/.test(userAgent); | |
browser.mac = browser.isMac = !! /macintosh/.test(userAgent) || (/mac os x/.test(userAgent) && !/like mac os x/.test(userAgent)); | |
browser.lion = browser.isLion = !! (/mac os x 10_7/.test(userAgent) && !/like mac os x 10_7/.test(userAgent)); | |
browser.iPhone = browser.isiPhone = !! /iphone/.test(userAgent); |