Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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/bash | |
# mcu.sh: Marble color unifier. | |
# (From "four bags with one red, one green, and one blue marble per bag" | |
# to "four bags with three marbles per bag") | |
# Downloads: Multiply_4_bags_3_marbles.svg | |
# Makes: 4x3_1.svg 4x3_1.png 4x3_2.svg 4x3_2.png | |
# Depends on: wget sed inkscape gm (GraphicsMagick) |
This file contains 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
// server.js | |
// パラメータ付きのGET/POSTメソッドを受け付ける小さなHTTPサーバ | |
// 実行方法 | |
// 適当なディレクトリにこのファイルを置いて | |
// npm init -y | |
// npm install express | |
// node server.js | |
// 別端末で | |
// curl -X GET 'http://localhost:8080/?abc=def' | |
// curl -d ABC=xyz 'http://localhost:8080/' |
This file contains 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 | |
# qpr.rb : 四角形(Quadrilateral)の2辺の関係に基づき平行(Parallel)・ | |
# 垂直(Right angle)の数を求め,2次元平面上に図形を描画する | |
# by takehikom | |
# see also: | |
# 青山尚司「平行だけでなく,垂直も観点に加えた四角形の弁別より」, | |
# 算数授業研究, Vol.137, pp.58-59 (2021). [isbn:9784491046365] | |
class QPR |
This file contains 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 | |
# polygon-plotter.rb : A calculator of polygonal coordinates | |
# by takehikom | |
# see also: | |
# https://takehikom.hateblo.jp/entry/2021/05/14/073039 | |
# https://takehikom.hateblo.jp/entry/2021/05/15/073040 | |
class PolygonPlotter | |
def initialize(opt = {}) |
This file contains 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 | |
# hexdot-generator.rb : A dot generator for math education | |
# by takehikom | |
# see also: https://takehikom.hateblo.jp/entry/2021/04/25/082407 | |
class HexdotGenerator | |
def initialize(opt = {}) | |
@filename = opt[:file] || "hexdot.svg" | |
setup |
This file contains 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
;; M-x insert-timestamp-default (またはM-x its)で Wed Feb 17 22:18:46 2021 | |
;; M-x insert-timestamp-htmlcomment (またはM-x itsh)で <!-- 2021-02-17 22:18:52 +09:00 --> (と改行) | |
;; M-x insert-timestamp-unixtime (またはM-x itsu)で 1613567937 | |
;; M-x insert-timestamp-iso (またはM-x itsi)で 2021-02-17T22:19:01+09:00 | |
(defun insert-timestamp-default () | |
"Insert the current timestamp" | |
(interactive) | |
(insert (current-time-string))) | |
(defalias 'its 'insert-timestamp-default) |
This file contains 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 | |
# radicalfinder.rb : 部首と同じ字形の漢字を求める | |
# by takehikom | |
require "roo" # gem install roo | |
class Radicalfinder | |
def initialize(opt = {}) | |
@opt_kyoikukanji_only = opt[:kyoiku] |
NewerOlder