Skip to content

Instantly share code, notes, and snippets.

@KitaitiMakoto
KitaitiMakoto / Rakefile
Last active July 27, 2019 16:19
How to use wax_iiif
file "build/#{name}/collection/top.json" do |task|
builder = WaxIiif::Builder.new(
base_url: "#{base_url}/#{name}",
output_dir: "build/#{name}",
verbose: true
)
records = Dir.glob("images/#{name}/**").collect {|path|
WaxIiif::ImageRecord.new(
id: File.basename(path),
path: path,
@KitaitiMakoto
KitaitiMakoto / Rakefile
Last active July 17, 2019 05:51
How to use wax_iiis
file "build/001bj/collection/top.json" => ["images/001bj/001bj-210-0.png"] do |task|
builder = WaxIiif::Builder.new(
base_url: ENV["BASE_URL"],
output_dir: "build/001bj",
verbose: true
)
records = Dir.glob("images/001bj/**").collect {|path|
WaxIiif::ImageRecord.new(
id: File.basename(path),
path: path,
require "active_record"
config = {
adapter: "sqlserver",
host: "localhost",
port: 1433,
username: "sa",
password: "yourStrong(!)Password",
database: "groupby"
}
require "active_record"
config = {
adapter: "sqlserver",
host: "localhost",
port: 1433,
username: "sa",
password: "yourStrong(!)Password",
database: "groupby"
}
require "active_record"
config = {
adapter: "sqlserver",
host: "localhost",
port: 1433,
username: "sa",
password: "yourStrong(!)Password",
database: "groupby"
}
@KitaitiMakoto
KitaitiMakoto / file0.txt
Last active March 24, 2017 14:36
OS Xでruby-installでRubyを入れる ref: http://qiita.com/KitaitiMakoto/items/677868276a8f7d5a5ce8
% ruby-install ruby-2.3.3
require 'rouge/lexers/fluentd/version'
module Rouge
module Lexers
class Fluentd < Apache
title "Fluentd"
desc "configuration files for Fluentd"
tag "fluentd"
filenames "fluent.conf", "td-agent.conf"
<div class="highlight"><pre><span class="nt">&lt;source&gt;</span>
<span class="nb">type</span> ping_message
<span class="nb">data</span> ${hostname}
<span class="nb">tag</span> ping
<span class="nb">interval</span> <span class="m">60</span>
<span class="nt">&lt;/source&gt;</span>
<span class="nt">&lt;match</span> <span class="s">app.**,ping</span><span class="nt">&gt;</span>
<span class="nb">type</span> forward
<span class="nt">&lt;server&gt;</span>
require "English"
require "json"
require "epub/ocf/physical_container/zipruby"
require "epub/parser"
require "epub/parser/cfi"
require "epub/maker"
require "rouge"
require "rouge/lexers/fluentd"
def main(argv)
{
"schema-version": "0.5.0",
"modified": "2016-06-03T00:00:00Z",
"target": "urn:uuid:5847863b-7653-4319-8c0b-ccee8a1dcac3@2014-08-08T09:00:00Z",
"patch": [
{"op": "replace", "cfi": "/6/20!/4/2/42/2", "value": "", "lang": "ruby"},
{"op": "replace", "cfi": "/6/20!/4/2/80/2", "value": "", "lang": "fluentd"},
{"op": "replace", "cfi": "/6/20!/4/2/94/2", "value": "", "lang": "fluentd"},
{"op": "replace", "cfi": "/6/30!/4/2/70/2", "value": "", "lang": "json"},
{"op": "replace", "cfi": "/6/30!/4/2/126/2", "value": "", "lang": "fluentd"},