Skip to content

Instantly share code, notes, and snippets.

Yoshiki Shibukawa shibukawa

Block or report user

Report or block shibukawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bench_brbundle.go
package main
import (
"github.com/NYTimes/gziphandler"
//"github.com/shibukawa/brbundle/brhttp"
"log"
"net/http"
)
func main() {
View crlite.go
package crlite
import (
"database/sql"
"fmt"
"io"
"os/exec"
"syscall"
"time"
@shibukawa
shibukawa / main_test.go
Last active May 7, 2019
pure go compression benchmark
View main_test.go
package main
import (
"bytes"
"compress/flate"
"github.com/golang/snappy"
"github.com/pierrec/lz4"
"io"
"io/ioutil"
"testing"
@shibukawa
shibukawa / headhunting.txt
Created Apr 12, 2019
違う人向けのメッセージがきた
View headhunting.txt
はじめまして、私はジーニアス株式会社の佐藤朋美と申します。
当社はヘッドハンティングを専門としております。
(link: https://www.genius-japan.com/) genius-japan.com
突然のご連絡となりますが、お返事頂ければ大変うれしく思います。
先日、不躾ながら、Kurotaki様へお手紙をお送りさせて頂きました。
お手元に届いているかと存じますが、念のためメールでもご連絡させて頂きました。
現在弊社では、自動運転技術において日本最高峰の企業から依頼を受け、サービスを推進しプロジェクトを統括できるシニアエンジニアを探しております。
View sortset.py
>>> a = [ 9, 5, 4, 2, 1]
>>> b = [ 2, 4, 7, 8, 10]
>>> def sortset(s, a):
... return sorted(s, key=lambda e: a.index(e))
...
>>> sortset(set(a) - set(b), a + b)
[9, 5, 1]
>>> sortset(set(b) - set(a), a + b)
[7, 8, 10]
View gist:1a141980539864e1186ffae3c1a77a37
https://twitter.com/y_cony/status/1098757985487048704
いいリーダーの共通点
・朝の「おはよう」を先に言う
・忙しそうに見えない
・まずは周りに与える
・話を黙って最後まで聴く
・会議の終了時間を死守する
・叱るときは冷静に、褒めるときは感情的に
View gist:709d6af5caaecb920a98250b0c74bfd0
commit 839b0d941e962c9b902804312f301700ba203d98
Author: Yoshiki Shibukawa <>
Date: Fri Jun 30 11:02:26 2017 +0900
追加し忘れていたサンプルを追加
commit f95422007bf5689ccfeefa1812916209b4af6485
Merge: 252df5f 268f8bc
Author: Akihiro Takizawa <>
Date: Fri Jun 16 10:30:13 2017 +0900
View cg.d.ts
interface ICommonColumn<T> {
width?: number | string;
minWidth?: number | string;
maxWidth?: number | string;
caption?: string;
style?: IStyle | styleFunction<T>;
padding?: string | number[];
textOverflow?: "clip" | "ellipsis";
action?: string;
@shibukawa
shibukawa / generics.md
Last active Sep 29, 2018
Feedback for generics/contract proposals
View generics.md

Abstract

I don't think this generics/contract proposals have enough advantages. I am against them.

Why Generics is needed

For a long period, many people have wanted generics for the following purposes:

  • Avoid type casting from interface{} (as this proposal mentioned).
  • Improve performance (like C++'s specization feature like this).
@shibukawa
shibukawa / error handling.md
Last active Sep 28, 2018
Every handle should have return statement
View error handling.md

Basically, error handling code and regular code have different purpose/aspect. So splitting error handling code from regular code is just introducing some type of "goto" structure essentially.

I like handle/check work locally inside function and are resticted not to escape between functions unlike exception are good point. But I think this design proposal may create a very complicated structure。

If there is only one handle per scope ({ }), it is resonable, but there are many handles and/or have defers in same scope, make code difficult. If we have to control error handling finely, error handling code and regular code are mixed like bunch of if err != nil sentences.

My suggestion

You can’t perform that action at this time.