そこそこの規模のプロジェクトにおいてコードやプロダクトの責任者(全てを知っている人)を明確化する
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
| package test | |
| import "reflect" | |
| func SliceEqualBy(slice interface{}, checkFun func(i int) bool) bool { | |
| rv := reflect.ValueOf(slice) | |
| for i := 0; i < rv.Len(); i++ { | |
| if !checkFun(i) { | |
| return false | |
| } |
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
| use strict; | |
| use warnings; | |
| use utf8; | |
| use 5.012; | |
| use Path::Class; | |
| dir('lib')->recurse( callback => sub { | |
| my $file = shift; | |
| return if $file->is_dir; |
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
| use common::sense; | |
| use Benchmark qw(:all); | |
| my @words = ( | |
| ' ほげ ', | |
| 'ほげ ', | |
| ' ぶう', | |
| 'ぶう', | |
| 'あいうえおかきくけっこ ', | |
| ' あいうえおかきくけっこ', |
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
| use common::sense; | |
| use Benchmark qw(:all); | |
| use Sub::Rate::NoMaxRate; | |
| use List::MoreUtils qw(none any); | |
| my @putturn1; | |
| push @putturn1, [ 100000, "a100000-1" ]; | |
| push @putturn1, map { [ 5, "a5-$_" ] } (1..50); | |
| push @putturn1, map { [ 3, "a3-$_" ] } (1..100); | |
| push @putturn1, map { [ 1, "a1-$_" ] } (1..1000); |
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
| ### これはOK | |
| local $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1; | |
| my $uri = URI->new( 'https://exapmpe.com/post'); | |
| my $request = POST $uri, | |
| Content_Type => 'multipart/form-data', | |
| Content => [ | |
| file1 => [ 'file1.mp4' ], | |
| file2 => [ 'file2.jpg' ], |
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
| // ==UserScript== | |
| // @name ZAC Emphasize | |
| // @version 0.1 | |
| // @copyright nagata-hiroaki@kayac.com | |
| // @namespace http://handlena.me | |
| // @description This script bring little better ZAC to you. | |
| // @include https://asp19.jp.oro.com/kayac/Shinsei/Nippou.asp* | |
| // ==/UserScript== | |
| document.getElementsByXPath = function(expression, parentElement) { |
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
| use common::sense; | |
| use Furl; | |
| use JSON::XS; | |
| my $FFPROBE = `which ffprobe`; | |
| chomp $FFPROBE; | |
| say encode_json( parse_all( shift ) ); |
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
| use common::sense; | |
| use Test::PostgreSQL; | |
| use Path::Class; | |
| # おそらくOSとかによってTest::PostgreSQLの期待するpostgersql.confの設定と違うため | |
| # 環境によって起動がクソ遅くなる | |
| # configを弄った方がいいのでauto_startはoff | |
| my $psql = Test::PostgreSQL->new( auto_start => 0 ); |
=とか => とか : とかを揃えるとコードが見やすいけど
みんなが意識高く揃えるとmergeする時に激しくコンフリクトして辛い問題
スーパーなプログラマ集団はどうしているんだろうなあ
foo : {
bar : 123,