Markdownでは文書中に画像ファイルを表示することができる。GitHubでReadmeに使うと見栄えがいい。
Markdown記法で書くならこんな感じ。"サンプル"の部分は省略可能。

| rand(0x10000000000000000000000000000).to_s(32).tr('0-9a-z', 'A-Z2-7').rjust(23, 'A') |
| #!/usr/bin/env ruby | |
| require "optparse" | |
| opts = ARGV.getopts("", "minutes:5", "load:", "help", "version") | |
| if opts["help"] | |
| puts <<EOS | |
| loadsleep |
| #!/usr/bin/env ruby | |
| require "optparse" | |
| require "json" | |
| require "open3" | |
| params = ARGV.getopts("cu:") | |
| c_opt = params["c"] ? "-c" : "" | |
| u_opt = params["u"] ? "-u #{params['u']}" : "" |
| --- | |
| title: parrotparty | |
| emojis: | |
| - name: parrot | |
| src: http://cultofthepartyparrot.com/parrots/parrot.gif | |
| - name: middleparrot | |
| src: http://cultofthepartyparrot.com/parrots/middleparrot.gif | |
| - name: rightparrot | |
| src: http://cultofthepartyparrot.com/parrots/rightparrot.gif | |
| - name: aussieparrot |
| #!/usr/bin/env ruby | |
| # require "headless" | |
| require "capybara" | |
| require "capybara-webkit" | |
| class Capybara::Session | |
| def wait_css(selector, timeout_sec = 5) | |
| timeout_sec.times do | |
| break if has_css?(selector) |
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| using namespace std; | |
| // カンマなどで区切られたstringを分割 | |
| vector<string> split(const string line, const string delim) | |
| { | |
| vector<string> result; |
| #!/usr/bin/env ruby | |
| # coding: utf-8 | |
| ma = %w[ま み む め も みゃ みゅ みょ] | |
| ru = %w[ら り る れ ろ りゃ りゅ りょ] | |
| sa = %w[さ し す せ そ しゃ しゅ しょ] | |
| ma.each do |m| | |
| ru.each do |r| |
「日本語環境セットアップヘルパ」がUbuntu 11.04で廃止され、 latex-env-jaやlatex-extra-jaも廃止された。なので関連するパッケージを一つ一つインストールする。 Ubuntu 11.10以降でもこの方法で大丈夫なはず。
Ubuntu 12.10以降は何かが変わるらしいので注意。 ASCII.jp:~師範、組版システム「TeX」について教えてください!~|行っとけ! Ubuntu道場!
Ubuntu 10.10で調べてみる。
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| local ($,, $\) = ("\n", "\n"); | |
| print map{ | |
| if ($_ % 15 == 0) { | |
| "FizzBuzz" | |
| } elsif ($_ % 3 == 0) { |