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 lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>カレーのレシピ</title> | |
</head> | |
<body> | |
<article> |
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 perl | |
use strict; | |
use warnings; | |
# 1 | |
my %japan = ( | |
tokyo => [ 'gotanda', 'shibuya', ], | |
osaka => [ 'shinsaibashi', ], | |
okinawa => [ 'naha', 'yomitan', ], | |
hokkaido => [ 'sapporo', 'obihiro', ], |
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 perl | |
use strict; | |
use warnings; | |
my %dog = ( | |
name => 'Taro', | |
color => 'brown', | |
); | |
my %cat = ( | |
name => 'Tama', |
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 perl | |
use strict; | |
use warnings; | |
my @dog = ( 'shiba', 'bulldog' ); | |
my @cat = ( 'mike', 'abyssinian' ); | |
my @bird = ( 'eagle', 'crow' ); | |
my @animal = (\@dog, \@cat, \@bird); |
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
# requirements: cho | |
# https://github.com/mattn/cho | |
function gbs { | |
local dest=$(git branch | sed -e 's/ *//' | cho) | |
dest=${dest##\* } # 現在のブランチを選択した場合の処理 | |
git checkout $dest | |
} |
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
inoremap <silent><Leader><Leader>z [0-9a-zA-Z@$%#&*;:?|,.]<ESC>$v0d | |
" 1. 上記をvimrcに入れて挿入モード時に全角検索用の文字列をヤンク | |
" 2-1. vim-easymotionの easymotion-sn コマンドと組み合わせてサーチ | |
" 2−2. この際、コマンドラインに貼り付けるには <C-r>" を使う | |
" 3. 一旦検索されたら以後は ; と , で前後に検索可能&その時にはハイライトされる | |
" 個人的にはこのハイライトがありがたいというかそもそもの目的 | |
" 最初はクエリを [^\x01-\x7E] としていたけど考えてみたら自分は日本語むっちゃ使うのでそれでは駄目だった。単純に拾いたくない全角英数記号だけを対象に絞り直した | |
" GIF movie |
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 perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
# 1-1 | |
my $foo = {name => 'note103', favorite_foods => [qw( ramen rice apple )]}; | |
my $bar = {name => 'alice' , favorite_foods => [qw( ramen kimuchi orange apple )]}; | |
my $baz = {name => 'bob' , favorite_foods => [qw( ramen meet kimuchi orange banana )]}; |
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 perl | |
use strict; | |
use warnings; | |
use File::Slurp; | |
my @ted_en = read_file('ted_en.txt'); | |
my @ted_ja = read_file('ted_ja.txt'); | |
my @out; | |
for my $te (@ted_en) { |
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 perl | |
use strict; | |
use warnings; | |
use File::Slurp; | |
my @iter = glob "*"; | |
my $sum = 0; | |
for (@iter) { | |
next if (-d $_); |
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
nnoremap <Leader>amz :%s/\v(amazon.+)\/(.+)(\/dp\/[^?\/]+).*/\1\3/gc<CR> |
NewerOlder