platex sample_slide.tex
dvipdfmx -l -p a4 sample_slide.dvi
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 | |
if ARGV.length != 1 | |
puts "Usage: ruby note-prevs.rb https://note.mu/USERNAME/n/NOTEID" | |
puts "Example: ruby note-prevs.rb https://note.mu/hyuki/n/n220bad7464fb" | |
puts "This program visits given user's pages via prev-link and puts their titles and urls." | |
abort | |
end | |
# cf. https://note.mu/wadako/n/n01733b19bc9c |
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 | |
# cf. http://bit.ly/2raKfLZ | |
# makeapp - スクリプトをMacのアプリケーションにする | |
if ARGV.length != 2 | |
abort("Usage: makeapp foo.rb Foo.app") | |
end | |
scriptname = ARGV[0] | |
appname = ARGV[1] |
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 | |
# cf. http://bit.ly/2raKfLZ | |
# makeopenapp - URLをオープンするだけのスクリプトをMacのアプリケーションにする | |
if ARGV.length != 2 | |
abort("Usage: makeopenapp URL Example.app") | |
end | |
url = ARGV[0] | |
appname = ARGV[1] |
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
a = '万中久乾亀亨享仁保元勝化吉同和喜嘉国大天字安宝寛寿平康延建弘徳応感慶成承授政文斉昌明昭景暦正武永治泰白祚神祥禄禎福老至興衡観護貞銅長雉雲霊養' | |
a.split(//).each do |x| | |
a.split(//).each do |y| | |
print "#{x}#{y}," | |
end | |
end |
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
\documentclass[dvipdfmx]{jsbook} | |
\usepackage{lmodern} | |
\usepackage{ccfonts} % ccfonts を入れると、sin, cosだけじゃなくすべての英文がConcreteになってしまうので注意 | |
\usepackage[euler-digits]{eulervm} | |
\usepackage[T1]{fontenc} | |
\usepackage{textcomp} | |
\usepackage[utf8]{inputenc} | |
\usepackage{amsmath,amssymb} | |
\pagestyle{empty} | |
\begin{document} |
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 | |
require 'tmpdir' | |
if ARGV.length != 3 | |
puts "mov-to-gif: Create animation GIF" | |
puts "Usage: mov-to-gif 1 input.mov output.gif -- normal (x1)" | |
puts "Usage: mov-to-gif 2 input.mov output.gif -- faster (x2)" | |
puts "Usage: mov-to-gif 0.5 input.mov output.gif -- slower (x0.5)" | |
abort |
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
/* | |
* TipmonaTipBookmarklet.js | |
* | |
* When you see | |
* https://twitter.com/EXAMPLEUSER/... | |
* Then you jump to | |
* https://twitter.com/intent/tweet?text=@tipmona%20tip%20@EXAMPLEUSER%201%20Mona%20を贈ります。 | |
* And when you see | |
* https://twitter.com/EXAMPLEUSER/status/xxxxxxxx | |
* Then you jump to |
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
require 'prime' | |
MAX = 10000_00000_00000 | |
n = Rational(0) | |
s = Rational(0) | |
Prime.each(MAX) do |p| | |
n += 1 | |
s += p | |
if (s/n).denominator == 1 | |
puts "f(#{n}) = #{s/n} : INTEGER" |
NewerOlder