勝手に target="_blank" した状態でリンクを開く
そのため、ブラウザの戻るや進むを押したときの挙動が確かめられない。
This file contains hidden or 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
[32;01m * [39;49;00mPackage: app-shells/bash-4.2_p29 | |
[32;01m * [39;49;00mRepository: gentoo_prefix | |
[32;01m * [39;49;00mUSE: bootstrap elibc_Darwin kernel_Darwin net prefix userland_GNU x64-macos | |
[32;01m * [39;49;00mFEATURES: nostrip preserve-libs | |
>>> Unpacking source... | |
>>> Unpacking bash-4.2.tar.gz to /Users/furu/Gentoo/var/tmp/portage/app-shells/bash-4.2_p29/work | |
[32;01m*[0m Applying bash42-001 ... | |
[A[72C [34;01m[ [32;01mok[34;01m ][0m | |
[32;01m*[0m Applying bash42-002 ... | |
[A[72C [34;01m[ [32;01mok[34;01m ][0m |
This file contains hidden or 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
# coding: utf-8 | |
require 'open-uri' | |
require 'nokogiri' | |
def bukkonuku_yo | |
doc = Nokogiri::HTML(open('http://blog.itopoid.net/mikan_yametai')) | |
message = [] | |
doc.css('img.size-full').each do |img| | |
message << img['title'] |
This file contains hidden or 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
<!-- layout.erb --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<%= yield %> <!-- ← ここに contents.erb の内容が埋め込まれる --> | |
</body> | |
</html> |
This file contains hidden or 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
<?php | |
/* | |
* 目的: print_r や var_dump をブラウザで見た場合にきれいに整形して表示する | |
*/ | |
function pp($expression, $method = 'var_dump') { | |
echo '<pre>'; | |
switch ($method) { | |
case 'print_r': | |
print_r($expression); |
This file contains hidden or 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
# 環境 | |
* Windows XP | |
* Vagrant のバージョン: 知らん。比較的新しいはず。 | |
# 構築 | |
* vagrant box add squeeze32 http://~ | |
* mkdir squeeze32 && cd squeeze32 |
This file contains hidden or 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
# こういうの迷う | |
get '/foo' do | |
return '' unless User.exists?(id: params[:id]) | |
# 以下処理... | |
response | |
end |
OlderNewer