Mojolicious::Lite で掲示板を書きます。
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
https://atom.io/packages/sync-settings |
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 'rss' | |
require 'ap' | |
rss_source = '' | |
rss = RSS::Parser.parse(rss_source, false) | |
rss.items.each do |item| | |
ap item.title | |
# ap item.description | |
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
curl -# -LO http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip | |
yes | unzip ken_all.zip | |
nkf --utf8 -Lu KEN_ALL.CSV > address.csv | |
rm ken_all.zip | |
rm KEN_ALL.CSV |
そのままではテストできない太古のプログラムは正規表現でメソッドを抜き出してテストする気概で。
テストのないコードがレガシーコード。自分が新たな技術的負債を作らないために。
O'Reilly Japan の詳説 正規表現 最新版を読む。
- 名前付きキャプチャ
- ^ と $ が必要な場合はお忘れなく ( Ex. /^\d+$/ )
radio では見出しでクリックできるようにとか、 フリガナはカタカナやひらがなの強制がないようにとか、 間違いを変更できない確認画面にしないとか、 人に親切に。
下記 2 つは必読。
- IPA 独立行政法人 情報処理推進機構:安全なウェブサイトの作り方
- 同ページにある「セキュリティ実装チェックリスト」を作る際のチェックリストに
- 体系的に学ぶ 安全なWebアプリケーションの作り方
会社にある本などで理解しておくこと。
- git init
- git add
- git commit
- git status
Vagrant を使い、開発環境を構築。今後も必要に応じて開発環境を作りましょう。
NewerOlder