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
--- ruby-enterprise.spec.orig 2011-08-12 01:07:59.000000000 +0900 | |
+++ ruby-enterprise.spec 2011-12-09 19:38:47.000000000 +0900 | |
@@ -87,7 +87,7 @@ | |
%defattr(-,root,root) | |
%{_bindir}/* | |
%{_prefix}/lib/* | |
-%{_prefix}/share/man/man1/ruby.1 | |
+%{_prefix}/share/man/man1/ruby.1.gz | |
%doc source/ChangeLog | |
%doc source/COPYING |
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
$ echo '*abc' | kramdown | |
<p>*abc</p> | |
$ echo '* abc' | kramdown | |
<ul> | |
<li>abc</li> | |
</ul> | |
$ echo ' *abc' | kramdown | |
<p>*abc</p> | |
$ echo ' * abc' | kramdown | |
<ul> |
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
(Date.parse('2012-01-01')..Date.parse('2012-01-31')).to_a.find_all { |d| | |
not d.sunday? and not d.saturday? | |
}.map { |d| | |
d.day | |
} |
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
if system( 'which identify' ) | |
desc 'list interlace images under current directory' | |
task :interlaced do | |
`find . -name '*.gif' -o -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' |\ | |
xargs identify -verbose | awk '/^Image:/ || /Interlace/'`.lines.each_slice(2) \ | |
{ |e| | |
puts e unless e[1].include?( 'None' ) | |
} | |
end | |
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
# -*- mode: ruby -*- | |
source :rubygems | |
gem 'rake' | |
if RUBY_PLATFORM.include?( 'darwin' ) and | |
RUBY_PLATFORM.match(/[0-9.]+\z/).to_s.split('.').first.to_i < 10 | |
gem 'guard', '< 0.9' | |
else | |
gem 'guard' |
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 | |
i = 1 | |
`git log --reverse --oneline`.lines.map { |commit| | |
commit.chomp.split(/\s+/).first | |
}.each { |ref| | |
system(sprintf("git branch %02d_%s %s", i, ref, ref)) | |
i += 1 | |
} |
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
@@ -29,7 +29,7 @@ | |
jasmine.Fixtures = function() { | |
this.containerId = 'jasmine-fixtures'; | |
this.fixturesCache_ = {}; | |
- this.fixturesPath = 'spec/javascripts/fixtures'; | |
+ this.fixturesPath = '__spec__/fixtures'; | |
}; | |
jasmine.Fixtures.prototype.set = function(html) { |
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
# -*- mode: ruby -*- | |
source :rubygems | |
gem 'rake' | |
gem 'rspec' | |
gem 'capybara', '< 2' | |
gem 'capybara-mechanize' |
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
# -*- mode: ruby -*- | |
include FileUtils::Verbose | |
@root = File.expand_path( File.dirname(__FILE__) + '/../../' ) | |
namespace :mongo do | |
desc 'prepare' | |
task :prepare do | |
dbpath = "#{@root}/db/mongodb" |
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 "open-uri" | |
NTP_SERVER = xxxx | |
ntp_time = Time.parse(URI("http://#{NTP_SERVER}").read.meta['date']) | |
local_time = Time.now | |
if ( (local_time.to_i - ntp_time.to_i).abs > 5 ) | |
abort "Your machine is wrong !\nIs it #{local_time} now ?\n" | |
end |