% rbenv exec bundle install --path=vendor/bundle
Fetching source index from http://rubygems.org/
Using rake (10.0.3)
(中略)
Using debugger-ruby_core_source (1.1.5)
Installing debugger-linecache (1.1.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/opt/rbenv/versions/1.9.3-p392/bin/ruby extconf.rb
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
| # -*- coding: utf-8 -*- | |
| require 'active_support/core_ext/string/strip' | |
| html = <<-EOS.strip_heredoc | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> | |
| <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0;' name='viewport'> | |
| <title>Shift-JISのHTMLメール</title> |
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
| #!/bin/env ruby | |
| # -*- coding: utf-8 -*- | |
| # prowl_notification.rb | |
| require 'prowl' | |
| KEY_TITLE = 'PROWL_NOTICE_TITLE' | |
| KEY_DESC = 'PROWL_NOTICE_DESC' | |
| API_KEY = 'PROWL_API_KEY' |
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/local/opt/rbenv/shims/ruby | |
| # -*- coding: utf-8 -*- | |
| require 'nokogiri' | |
| str =<<HTML | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> |
% curl 'http://services.gingersoftware.com/Ginger/correct/json/GingerTheText?&apiKey=6ae0c3a0-afdc-4532-a810-82ded0054236&lang=US&clientVersion=2.0&text=helllo' | jq "."
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 334 100 334 0 0 508 0 --:--:-- --:--:-- --:--:-- 509
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 'optparse' | |
| opts = OptionParser.new | |
| opts.on('--noop', 'dry-run mode') { |v| $noop = true } | |
| opts.parse! | |
| `git branch -r`.each_line do |branch| | |
| branch.strip!.chomp! | |
| next if branch =~ %r![^/]+/master! |
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/local/env ruby | |
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'typhoeus' | |
| request = [] | |
| hydra = Typhoeus::Hydra.new(:max_concurrency => 32) | |
| 1000.times.map do |
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
| # -*- coding:utf-8 -*- | |
| require 'benchmark' | |
| def gsub_check | |
| 10000.times do |n| | |
| " ".gsub(/ /, " ") | |
| end | |
| end | |
| def gsub_check_2 |
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
| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb | |
| index 41392c5..d9d4595 100644 | |
| --- a/spec/spec_helper.rb | |
| +++ b/spec/spec_helper.rb | |
| @@ -29,6 +29,13 @@ WebMock.allow_net_connect! #スタブ未設定URLへのアクセスを許可す | |
| # in spec/support/ and its subdirectories. | |
| Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | |
| +class String | |
| + def colorize(color_code); "\e[#{color_code}m#{self}\e[0m"; 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
| [Tue Mar 05 2013 12:45:38 GMT+0900 (JST)] ERROR Cannot load adapter skype - Error: Cannot find module 'hubot' | |
| TypeError: Cannot call method 'on' of null | |
| at Object.<anonymous> (/Users/ONDA/work/hubot/bin/hubot:136:19) | |
| at Object.<anonymous> (/Users/ONDA/work/hubot/bin/hubot:140:4) | |
| at Module._compile (module.js:449:26) | |
| at Object.exports.run (/Users/ONDA/.nodebrew/node/v0.8.18/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:82:25) | |
| at compileScript (/Users/ONDA/.nodebrew/node/v0.8.18/lib/node_modules/coffee-script/lib/coffee-script/command.js:177:29) | |
| at fs.stat.notSources.(anonymous function) (/Users/ONDA/.nodebrew/node/v0.8.18/lib/node_modules/coffee-script/lib/coffee-script/command.js:152:18) | |
| at fs.readFile (fs.js:176:14) | |
| at Object.oncomplete (fs.js:297:15) |