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
#!/bin/zsh | |
# photominifier.sh | |
# 撮影画像を縮小化する | |
# by takehikom | |
# 準備 | |
# ・要 Zsh, ImageMagick (convert, idenfity) | |
# ・DIR1 に,縮小化させたい画像ファイルのディレクトリを指定する | |
# ・DIR2 に,画像ファイルのバックアップディレクトリを指定する |
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
digraph wizardry_schema_cheetsheet_of_daily_and_weekly_quests { | |
// node[fontname="ms gothic"]; // Windowsではコメントを外す | |
graph [rankdir = LR, bgcolor = "#006600"]; | |
node [shape = box, style = filled, fillcolor = "#ccffcc"]; | |
日ダ [label = "日:ダンジョンを2回制覇せよ"]; | |
日S [label = "日:評価SSを獲得せよ"]; | |
日月 [label = "日:月曜ダンジョンを制覇せよ"]; | |
日火 [label = "日:火曜ダンジョンを制覇せよ"]; | |
日水 [label = "日:水曜ダンジョンを制覇せよ"]; |
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 | |
# triangle-triangle.rb | |
# 三角形三角形問題の描画 | |
# by takehikom | |
# 要ImageMagick (convertコマンド), フォント (IPAexゴシック) | |
# ruby triangle-triangle.rb | |
# env FONT=/full/path/of/ipaexg.ttf ruby triangle-triangle.rb |
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 | |
# $ ruby calc1.rb | |
# 1+2×3=7 | |
# 3×(8+5×(6-2))÷2=42 | |
# 6÷2(1+2)=1 | |
# 6÷2×(1+2)=9 | |
# Racc required (gem install racc) |
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 | |
# $ ruby calc2.rb | |
# 1+2×3=7 | |
# 3×(8+5×(6-2))÷2=42 | |
# 2(1+2)-2=4 | |
# 2(1+2)÷2=3 | |
# 6÷2(1+2)=1 | |
# 6÷2×(1+2)=9 |
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 | |
# $ ruby calc3.rb | |
# 1+2×3=7 | |
# 3×(8+5×(6-2))÷2=42 | |
# 2(1+2)-2=4 | |
# 2 (1+2)÷2=3 | |
# 2 - 2(1 + 2)=-4 | |
# 2 / 2 (1 + 2)=0 | |
# 2(1+2)(3+4)=42 |
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 | |
# ruby circle3.rb | |
# creates Quadrant3.png, Circle3L.png, Circle3C.png, and Circle3Lrotate.png. | |
# rmagick required (gem install rmagick) | |
require "rmagick" | |
require "bigdecimal" | |
require "bigdecimal/newton" |
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 | |
# ggl http://d.hatena.ne.jp/takehikom/ | |
# ggl -k Google_API_Key http://d.hatena.ne.jp/takehikom/ | |
# ggl -f Google_API_Key_File http://d.hatena.ne.jp/takehikom/ | |
# ggl -F http://d.hatena.ne.jp/takehikom/ http://d.hatena.ne.jp/takehikom/rss | |
function ggl () { | |
local longurl json | |
local apiurl=https://www.googleapis.com/urlshortener/v1/url |
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 | |
# isilx.rb : ISIL extractor | |
# by takehikom | |
# see also: http://www.ndl.go.jp/jp/aboutus/standards/opendataset.html | |
require 'rexml/document' | |
class IsilExtractor |
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 | |
# assocchecker.rb : associativity checker for well-known logical operations | |
# by takehikom | |
class AssociativityChecker | |
def initialize | |
end | |
def and(*param) |