This file contains 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
source "https://rubygems.org" | |
ruby "2.1.1" | |
gem "sinatra" |
This file contains 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
% cat spec/falsey_spec.rb | |
describe do | |
it do | |
expect(true).to be(false) | |
end | |
it do | |
expect(true).to eq(false) | |
end | |
end | |
% bundle exec rspec -v |
This file contains 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 -*- | |
# env_ltsv_each.rb | |
# https://gist.github.com/znz/849166c048a2117c341d | |
# copyright (c) 2014 Kazuhiro NISHIYAMA | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/MIT | |
require 'ostruct' | |
def env_ltsv_each(prefix, start: 0, encoding: Encoding::UTF_8, scrub: false) | |
block_given? or return enum_for(__method__) |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
$str = "abcd" | |
data = %w[ | |
0 14 5 14 | |
32 0 38 12 | |
46 28 0 7 | |
33 18 44 0 | |
] | |
data = data.map(&:to_i) |
This file contains 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
[33m[44m[1mWelcome to the Ruby Enterprise Edition installer[0m[37m[40m | |
This installer will help you install Ruby Enterprise Edition 1.8.6-20080810. | |
Don't worry, none of your system files will be touched if you don't want them | |
to, so there is no risk that things will screw up. | |
You can expect this from the installation process: | |
[1m1.[0m[37m[40m Ruby Enterprise Edition will be compiled and optimized for speed for this | |
system. | |
[1m2.[0m[37m[40m Ruby on Rails will be installed for Ruby Enterprise Edition. |
This file contains 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
http://groups.google.com/group/redmine-users-ja/browse_thread/thread/6ca8cfb88541e254/40dcd8d66de85a31?#40dcd8d66de85a31 | |
の文字化け対応パッチが改行とかの問題でそのままだと当てられない。 |
This file contains 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 -r 23aa8d1c4bcf -r d7daa8217d67 app/controllers/hoge_controller.rb | |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
+++ b/app/controllers/hoge_controller.rb Wed Nov 05 20:09:58 2008 +0900 | |
@@ -0,0 +1,10 @@ | |
+class HogeController < ApplicationController | |
+ session :off | |
+ | |
+ def index | |
+ end | |
+ |
This file contains 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/ruby | |
require 'ripper/filter' | |
class CheckRegexpN < Ripper::Filter | |
def on_regexp_end(token, data) | |
if /n/ =~ token | |
puts "#{data}:#{lineno}:#{token}" | |
end | |
data |
This file contains 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
(setq load-path | |
(cons "~/.emacs.d/site-lisp/elisp" load-path)) | |
(require 'auto-complete) | |
(setq-default ac-sources '(ac-source-abbrev ac-source-words-in-buffer)) | |
(global-auto-complete-mode t) | |
(setq ac-auto-start 3) | |
(add-hook | |
'emacs-lisp-mode-hook | |
(lambda () | |
(setq ac-sources '(ac-source-words-in-buffer ac-source-symbols)))) |
This file contains 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
checking build system type... i386-pc-solaris2.11 | |
checking host system type... i386-pc-solaris2.11 | |
checking target system type... i386-pc-solaris2.11 | |
checking for gcc... gcc | |
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes |
OlderNewer