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
| # based lib/jekyll/site.rb of jekyll 0.11.0 | |
| module Jekyll | |
| class Site | |
| class PostList < Array | |
| def sort | |
| self.class.new(super) | |
| end | |
| def next(obj) | |
| setup_index_cache |
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 | |
| # encoding: utf-8 | |
| require 'mini_magick' | |
| require 'origami' | |
| include Origami | |
| def fixup!(pdf) | |
| pdf.root_objects.each do |obj| | |
| next unless obj.is_a?(Graphics::ImageXObject) |
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
| # encoding: utf-8 | |
| # | |
| # Groongaの類似文書検索機能を使って類似記事を抽出する。 | |
| require 'tmpdir' | |
| require 'groonga' | |
| module Jekyll | |
| class Site | |
| alias process_without_groonga process |
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 'tilt' | |
| module Sprockets | |
| class RemoveFontFaceExceptTheFirstOne < Tilt::Template | |
| def prepare | |
| end | |
| def evaluate(context, locals, &block) | |
| found = false | |
| data.gsub(/^@font-face {[^}]*}/) 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
| require 'rubygems' | |
| require 'fileutils' | |
| require 'open-uri' | |
| require 'pathname' | |
| task :bundler do | |
| require 'bundler/setup' | |
| Bundler.require(:default) | |
| require 'jekyll' | |
| require './_libs/post_editor' |
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 'action_view' | |
| require 'ruby-beautify' | |
| require 'ripper' | |
| require 'tmpdir' | |
| require 'fileutils' | |
| require 'optparse' | |
| def check_syntax(path, options = {}) | |
| erb = content(path) | |
| code = ruby_code(erb) |
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
| # usage: | |
| # ruby manual_import_migrations.rb ../path/to/project/db/migrate/**/*.rb | |
| require 'optparse' | |
| require 'fileutils' | |
| require 'ripper' | |
| def omit_pos(token) | |
| if token.size == 3 && | |
| token[-1].is_a?(Array) && token[-1].size == 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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| # | |
| # Requirements: | |
| # * groonga command | |
| # * jq command <http://stedolan.github.io/jq/> | |
| # * pry 0.10.x | |
| # | |
| # Configuration: | |
| # * ~/.groonga-pryrc |
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
| with→enableの間違いを直すとonig-sourceの中身をbuildしてくれなくてコケるという流れ。 | |
| いきなりmake installでなく、いったんmakeすれば回避できるみたい。 | |
| diff --git a/Library/Formula/groonga.rb b/Library/Formula/groonga.rb | |
| index 66a643d..441bddc 100644 | |
| --- a/Library/Formula/groonga.rb | |
| +++ b/Library/Formula/groonga.rb | |
| @@ -28,7 +28,7 @@ class Groonga < Formula | |
| --prefix=#{prefix} | |
| --with-zlib |
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/Library/Formula/groonga.rb b/Library/Formula/groonga.rb | |
| index 386e7ca..94e0a41 100644 | |
| --- a/Library/Formula/groonga.rb | |
| +++ b/Library/Formula/groonga.rb | |
| @@ -39,7 +39,7 @@ class Groonga < Formula | |
| --prefix=#{prefix} | |
| --with-zlib | |
| --disable-zeromq | |
| - --with-mruby | |
| + --enable-mruby |