2020/07,江端さんの技術メモ

江端家では、2本の愛用包丁(南部鉄(*))があります 。これらの包丁は、長期の使用で私が修理を繰返して使い倒しています。

(*)鉄分補給がしやすい、という特徴があるそうですが、包丁(×鍋、×フライパン)でその効果が発揮できるのかは不明です

今回も柄が折れしまったので、Amazonで新しい柄を購入して修理することにしました。

で、こちらが解体した包丁。

解体に際に気を付けることは、包丁に力を加えないこと。包丁の金属の柄の部分は、すでに長期に渡って金属疲労が与えられ続けられており、簡単に「ポッキリ」いきかねないから。包丁の刃の柄が折れたら、もう再利用はできない

木の柄の部分と、プラスチック(黒)の部分を、ペンチやニッパーを使って、地道に破壊していくことが必要。

Amazonから届きました。

IMG-0608.JPG を表示しています

コンロで、刃の柄の先端が真っ赤になるまで加熱する。

IMG-0604.JPG を表示しています

あとは、鉄の柄を、木の柄に差し込むだけ。簡単にズブズブと刺さる。(私の場合)刃を立ててそのまま押し込みました。

IMG-0606.JPG を表示しています

本当は、この後、ロウを入れたりするらしいが、私は全部省略して、自然に冷えるのを待って作業を完了しました。

(追記)

その後、刃の柄が、木の柄にガッチリ固定されずに、グラグラしてしまうので、一度、刃の柄を出した後、木の柄の溝に木工用ボンドを投入して、一日程、放置した。

結果としては、固定されなかった。

これは、木工用ボンドが柄の中で固まらなかった為と思われる(多分、まだ液状になっているのだと推測)。

そこで、刃の柄を、木の柄に差し込んだ状態で、刃をコンロの火に晒してみた。これによって、木工用ボンドを強制的に乾燥させる為である。

上手く接着できたかどうかは、後日報告する。

以上

2020/08,江端さんの忘備録

コロナ感染症対策として、マスクが有効か否かついては、こちらで記載しております。

Whether or not masks are effective in fighting corona infection is described here.

また、こちらで記載しているように、感染しているか否かを、"0"と"1"のように考えることができないことも明らかです。

It's also clear that you can't think of being infected or not as a "0" and a "1", as described here.

しかし、その効果がどうであれ、「マスク」が一種のマナーとなっているのは事実です。

But whatever the effect, it is true that "masks" have become a kind of etiquette.

そして、「マスク」は、いわゆる「コロナリテラシー」の初歩の初歩と言えます。

And the "mask" is the first step of steps in so-called "corona literacy".

私としては、このマスクに加えて「COCOA(新型コロナ接触確認アプリ)」を、このマナーに入れることを提言したいと思います。

For me, I would like to suggest that in addition to this mask, the COCOA (new corona contact verification app) be included in this etiquette.

COCOAについては、すでに私、色々書いていますので、参考にして下さい。

I've already written a lot about COCOA, so please refer to it.

■COCOAのインストールは個人の自由ですが、私はインストールをお勧めしたいと思います。

Installing COCOA is a personal choice, but I would recommend that you install it.

■「セキュリティが万全」というよりは、「ハックするコストが全然見合わない」という感じです。

It's not so much "full security" as it is "not at all worth the cost to hack.

私は、「COCOAのインストール」を実施したか/していないかで、その人の「コロナリテラシー」を判断できると思っています。

I believe you can determine a person's "corona literacy" by whether or not they have/don't have implement a "COCOA installation".

-----

やり方は色々あると思いますが、もっとも簡単な方法は、

There are many ways to do this, but the easiest way is to ask a question,

『COCOAインストールしました?』

"Have you installed COCOA?

という質問をすることです。

■「もちろんです」という人は、リテラシー"1"で良いと思います。

If the person says "of course", I think his/her literacy level is "1".

■「ああ、COCOAですね。でも個人情報について不安が・・・」という人は、「リテラシー"0.9"」くらいと判断して良いかと思います。

"Oh, COCOA. But I'm worried about personal information...", I think it's safe to say that he/she have a literacy level of "0.9".

比して、

In comparison to,

■「COCOA? 何ですか、それ?」という人は、「リテラシー"0"」と断定して良いでしょう。

If the person says "COCOA? What's that?", I think his/her literacy level is "0".

いわゆる「自粛警察」をやっている人で、COCOAを知らない人がいたら、あなたは、その「自称警察官」、殴っていいです。

If you're a so-called "self-restraint police" and you don't know COCOA, I will hit you absolutely.

(私は、これに加えて、大声で、"ふざけるな!"と罵ります)。

In addition, I will shout "Do not be silly!" loudly,

(続く)

(To be continued)

2020/08,江端さんの技術メモ

golang ではファイル名が _test.go で終わるファイルを run すると
上記のエラーが表示されて実行できません。

ちなみに、buildだと

$ go build echo_test.go
no packages to build

と表示されて、なんのことやらさっぱり分かりませんでした。

2020/08,江端さんの技術メモ

$ go build echo.go
echo.go:4:5: cannot find package "github.com/trevex/golem" in any of:
        c:\go\src\github.com\trevex\golem (from $GOROOT)
        C:\Users\ebata\go\src\github.com\trevex\golem (from $GOPATH)

ebata@DESKTOP-P6KREM0 MINGW64 ~/go_websocket_test
$ go get -u github.com/trevex/golem

ebata@DESKTOP-P6KREM0 MINGW64 ~/go_websocket_test
$ go build echo.go

2020/08,江端さんの忘備録

(昨日の続きです)

(Continuation from yesterday)

私は、コラムを書くのが好きで、イラストを描くのが好きで、コーディングをするのが好きで、そして ――

I like to write columns, I like to illustrate, I like to code, and

その全てが「下手くそ」です。

I am not good at all of them.

だから、これらを他人に任せるのが、もっとも効率的であり、いわゆる『生産性が上がる』のは間違いないでしょう。

So, I think it's most efficient to leave these things to others, and there is no doubt that it will increase so-called "productivity".

だが、それは「楽しいのか?」

But is it "fun"?

自分の作り出したモノ、自分でやった仕事は、他人のモノや仕事より「愛おしくはないか?」

Do you love what you created and worked, more than other people's creations and works ?

と考えると、私には分からなくなるのです。

I don't know that.

それ故に、私は「私を幸せにするアプローチ」として、

Therefore my "approach to making me happy

(1)ひとりでやる

(1) Do it alone.

(2)ずっとやる

(2) Do it for a long time.

(3)会議に出ない(ここはGoogleと同じで、これまでも、これからも)

(3) Don't attend meetings.(It's the same as Google here, from now and to now)

を続けていくことになると思います。

I think I'll continue to do them.

-----

つまるところ、これは人間のスケール感の問題かもしれないなぁ、とも思います。

As a result, I think that this is about a matter of human scale.

私は「技術」が好きで、特に「小技」が好きですが、その技の集大成である「サービス」や「ビジネス」が好きな人にとっては、「Google式仕事術」は正しいアプローチだと思います。

While I like "technology" and especially the "little tricks, for people who like "service" and "business", the "Google Method of Working" is the right approach.

私は、「他の人」を喜ばせることに幸せを感じられます。

I feel happy to please other people.

しかし、私は、「"多く"の他の人」を喜ばせることが、"多くの幸せ"になるとは、感じることはありません。

However I can't feel many happiness to please many other people.

つまるところ、

In conclusion,

『私は、人間としての器が小さい』

"I don't have what it takes"

この結論で、私は異義ありません。

I have no objection to this conclusion.

2020/08,江端さんの忘備録

「Google式仕事術」では、生産性を上げる為に、以下を提唱しているそうです(読んでいません)。

The "Google Method of Working" advocates the following to increase productivity (I haven't read it)

(1)ひとりでやらない

(1) Don't do it alone.

(2)ずっとやらない

(2) Don't do it for a long time.

(3)会議に出ない

(3) Don't attend meetings.

なるほど「生産性を上げる為」には、これが正解かもしれません。

Okay, maybe this is the right thing to do "to increase productivity".

しかし、「生産性なんぞ知ったことか」と置き換えるだけで、このメソッドはボロボロと崩れていきます。

But simply replacing it with "I don't care of productivity", the method falls apart in tatters.

-----

私、生産性については、かなり徹底的に勉強しました。

Me, I've studied productivity pretty thoroughly.

その結果、「生産性について、合意が取れている定義が存在しない」ということを発見しました。

As a result, I found that "there is no agreed-upon definition of productivity.

そして、「生産性」と「幸福」の間には、強い相関が存在しないことも知りました。

I also learned that there is no strong correlation between "productivity" and "happiness".

-----

「生産性を上げる = 幸福」と「幸福 = 善」から、「生産性を上げる = 善」という三段論法は成立します。

The triadic argument, "Increase productivity = happiness" and "Happiness = goodness," is established from "Increase productivity = goodness.

しかし、

However, it can also be interpreted as,

―― その"生産性"を上げるのは、"私以外の誰か"で良くね?

"Why can't someone other than me make it more productive?"

という解釈が可能です。

さらに、「Google式仕事術」が、"この私"に「楽しさや喜びを与えているのか?」 という点について、私には分からないのです。

Furthermore, I can't know that "Google Method of Working" gives me joy and pleasure of mine.

■自分でコラムを書かなくても、面白いコラムを書いている人がいるから、そのコラムを読めばいい。

- Even if I don't write your own column, someone else writes an interesting column, so I can read it.

■綺麗なイラストを書ける人は、世の中にゴマンといるから、その人に外注すればいい

- There are many people who can draw beautiful illustrations in the world, so I can outsource to them.

■自分でコーディングしなくても、コーディングのプロに頼めばいい

- I can ask a professional to do the coding for me.

まったく、その通りだと思います。

I think these are absolutely right.

(続く)

(To be continued)

江端さんの忘備録

コンテナに、"ebata_db_1" とか、 "ebata_db_data_1"とかの名前ができているんだけど、一体、誰が命名しているのか全然分からなかったけど、たまたま見つけたので記載しておく。

ディレクトリ名 "casim2020"のところに、以下のdocker-compose.yml を作り、

version: '3.7'

services:
  db:
    image:  postgis-pgrouting:latest
    environment:
      POSTGRES_HOST_AUTH_METHOD: 'trust'
      POSTGRES_PASSWORD: 'postgres'
    expose:
      - 5432
    ports:
    - 15432:5432
    volumes:
      - db_data
      - ./shared:/shared
  db_data:
    image: busybox
    volumes:
      - /data/db

ebata@DESKTOP-P6KREM0 MINGW64 ~/casim2020
$ docker-compose up -d
Creating network "casim2020_default" with the default driver
Creating casim2020_db_1 … done
Creating casim2020_db_data_1 … done

というように、ディレクトリの名前が自動的に付与されるらしい。

2020/05,江端さんの技術メモ

  1. データベース新規作成
    psqlでデータベースを新規作成する(以下、データベース名をca_simとする)。

postgres=#CREATE DATABASE ca_sim

  1. データベース拡張

psqlに入って次のコマンドを実行する。

postgres=# \c ca_sim
postgres=# create extension postgis;
postgres=# create extension pgrouting;

  1. kashiwanoha.osmを読み込む

C:\Users\ebata\Desktop\20190327_casim_final\environment>docker cp kashiwanoha.osm ebata_db_1:/db_data

4.osm2pgrouting をインストール(が、できると思わなかったので、かなり驚いた)

うまくいなかかったときは、apt-get update; apt-get update をやってみる

root@70fa5aa3a11d:/# apt-get install osm2pgrouting

5.kashiwanoha.osmをインポート

root@70fa5aa3a11d:/# osm2pgrouting -f /db_data/kashiwanoha.osm -c /usr/share/osm2pgrouting/mapconfig_for_cars.xml -d ca_sim -U postgres

6.sqlファイルをシェルから実施する

root@70fa5aa3a11d:# psql -f /db_data/make_bus_route_table.sql -d ca_sim -U postgres

2020/07,江端さんの技術メモ

Docker commitで作ったイメージをアップしてみようと思って、docker pushを使ってみたんだけど、上手く動きませんでした。

ebata@DESKTOP-P6KREM0 MINGW64 ~/xxxxxxx_ride_hailing_go
$ docker push ebata_db_data_1_back2
The push refers to repository [docker.io/library/ebata_db_data_1_back2]
d103f95b4a98: Preparing
195be5f8be1d: Preparing
denied: requested access to the resource is denied

ebata@DESKTOP-P6KREM0 MINGW64 ~/xxxxxxx_ride_hailing_go
$ docker push ebata_db_data_1_back2
The push refers to repository [docker.io/library/ebata_db_data_1_back2]
d103f95b4a98: Preparing
195be5f8be1d: Preparing
denied: requested access to the resource is denied

なんで上手くいかないのかなー、とググッてみたら、イメージ名にルールがあったみたいです。ユーザ名がtomoichiならば、image作る時に、こういう名前にしなければダメみたい。

ebata@DESKTOP-P6KREM0 MINGW64 ~/xxxxxxx_ride_hailing_go
$ docker commit f5ae64d47096 tomoichi/ebata_db_data_1_back2
sha256:bf565f55a2cf06e0c9fe6ecb3460f7afe7228cf48886ae0a71cde6bf770ebf1c

ebata@DESKTOP-P6KREM0 MINGW64 ~/xxxxxxx_ride_hailing_go
$ docker commit 64101530c199 tomoichi/ebata_db_1_back2
sha256:6243b4ad2ea96bca6183b331a1c2c4467c9337ce2b305e40ca6a1d456b58df8d

でもって、

ebata@DESKTOP-P6KREM0 MINGW64 ~/xxxxxxx_ride_hailing_go
$ docker push tomoichi/ebata_db_data_1_back2
The push refers to repository [docker.io/tomoichi/ebata_db_data_1_back2]
d103f95b4a98: Preparing
195be5f8be1d: Preparing
d103f95b4a98: Pushed
195be5f8be1d: Pushed
latest: digest: sha256:e69eb3011f892fc5fe80530657f2ed0c1b59202cdca62788483315412a54be50 size: 734

みたいに成功するようです。

2020/08,江端さんの技術メモ

「パスワードの長さが足りん」とか言われるが、今さらログイン環境変えるのも恐しいので、なんかとできないか探ってみた。たまたま上手くいったのでメモを残しておく

と、9文字以上のパスワードが必要と言われたが、"Sing in"を押下する。

入れた様子。

Dockerの環境、ふっとぶとか考えるだけで怖いので、できるだけ何も変更しないで進めたい。