- はじめに
- 対象読者
- ゴール
- コマンドの表記ルール
- Level 1
- Hello!
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
/** | |
* | |
* リンククリック時に POST でリクエストするようにフックする. | |
* | |
* [使い方] | |
* | |
* HTML で以下のようにリンクを設定しているとする. | |
* | |
* <a href="..." class="post">...</a> | |
* |
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
" | |
" 現在のカーソル位置にシェルピンスキーの三角形を挿入する. | |
" | |
" MIT Lisence | |
" | |
" [使い方] | |
" | |
" 1. :source sierpinski.vim | |
" 2. :Sierpinski | |
" |
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 'openssl' | |
class Cipher | |
# 初期化ベクトル. | |
attr_reader :iv | |
# 暗号鍵. | |
attr_reader :key |
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
function memo { | |
local memo_dir=~/.memo | |
mkdir -p "$memo_dir" | |
local current_memo_file=$memo_dir/memo.`date '+%Y-%m-%d'`.txt | |
local previous_memo_file=$memo_dir/`ls -1 "$memo_dir" | tail -1` | |
if [ ! -f "$current_memo_file" -a -f "$previous_memo_file" ]; then | |
cp -pi "$previous_memo_file" "$current_memo_file" | |
fi |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base target="_top"> | |
<style> | |
fieldset { | |
margin-top: 1em; | |
margin-bottom: 1em; | |
} | |
#generate { |
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/ruby | |
# | |
# Amazon の URL から冗長な要素を削除する. | |
# | |
# Example: | |
# cat amazon-urls.txt | ruby reduce-amazon-url.rb | |
# | |
while line = gets do | |
url = line.chomp |
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
/** | |
* 指定された日付が休業日であるか判定する. | |
* | |
* @param {Date} date | |
* 判定対象の日付. | |
* | |
* @return {Object} | |
* 休業日の場合は Truthy な値. | |
* 休業日ではない場合は Falsy な値. | |
*/ |
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
// | |
// Amazon の商品ページなどの URL を正規化する bookmarklet です. | |
// | |
// 具体例: | |
// | |
// https://www.amazon.co.jp/XXXXX/dp/B07FQ4DJ7X?tag=xxx&ref=xxx | |
// -> https://www.amazon.co.jp/dp/B07FQ4DJ7X | |
// | |
// https://www.amazon.co.jp/gp/product/B07FQ4DJ7X?tag=xxx&ref=xxx | |
// -> https://www.amazon.co.jp/dp/B07FQ4DJ7X |
OlderNewer