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,
import os
import sys
import time
import argparse
import boto3
if os.environ.get('AWS_PROFILE') is None:
sys.exit('Environment variable AWS_PROFILE not set')
argparser = argparse.ArgumentParser(description='Snapshot EC2 instance volume with volume ID specified by argument')
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 "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)
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>