
2019/12/20
wechat miniapp login
- wechat miniApp: wx.login -> code
- wechat miniApp: wx.request , send code to server api
- server request
- wechat API,get openId and sesion_key: https://api.weixin.qq.com/sns/jscode2session?appid=a&secret=b&js_code=codegrant_type=authorization_code
- use openId and session_key to generate access token
- response access token and openId to miniAPP(token1)
- wechat miniApp: wx.getSetting check user's authority.if not ,request user's authority.
- wechat miniApp: wx.getUserInfo can get user info.
- server request wechat api to get token(token2) :
- https://api.weixin.qq.com/cgi-bin/token?appid=a&secret=b&grant_type=client_credential
- server request wetchat api use token

docker show all container ,delete all
- docker show all container : docker container ls -a
- docker show volume: docker volume ls
- docker show image: docker image ls
- delete all unused objects: docker system prune -f --volumes
- delete all images: docker image prune -a
- docker-compose up -d --remove-orphans
スキリした。普通に30Gぐらい削除した。unusedの基準は曖昧かな
2019/12/18
golang gorm update when record not exist
when record is not exist. update will be success.
have to check RowsAffected .
the same as delte
have to check RowsAffected .
the same as delte
query := db.Model(r).Updates(something) if query.Error != nil { return query.Error } if query.RowsAffected == 0 { return gorm.ErrRecordNotFound }
query := db.Delete(&something{ID: ID}) if query.Error != nil { return query.Error } if query.RowsAffected == 0 { return gorm.ErrRecordNotFound }
2019/12/16
MacOS bad support on HFS/APFS
MacOS/OSX has very bad filesystem events support on HFS/APFS, watching the file-system for changes using
unox or fswatch was causing a heavy CPU load. This CPU load is very significant, even on modern high-end CPUs (like a i7 4770k / 3.5GHz).2019/11/24
android app without cm and gms
使う時使ってもらっていいじゃない?
情報を収集してなにをやりたい?
huawei 端末にgmsがないからいいかも
apk market: apk pure
apk manager: xapk manager
mp3 player: plusar
japanese input: Japanese Keyboard
情報を収集してなにをやりたい?
huawei 端末にgmsがないからいいかも
apk market: apk pure
apk manager: xapk manager
mp3 player: plusar
japanese input: Japanese Keyboard
2019/11/19
2019/09/25
docker-sync ruby error
xcodeアップデートしますかを聞かれて、アップデートした。
docker-syncがエラー
docker-syncがエラー
docker-sync start mkmf.rb can't find header files
ruby versionの管理が混乱になっている。
rbenvを導入
brew update brew install rbenv ruby-buildrbenv install -lrbenv install 2.6.4エラー、BUILD FAILED (OS X 10.。。。。sudo chmod -s /usr/sbin/dtraceRUBY_CONFIGURE_OPTS="--disable-dtrace" rbenv installでrubyをインストールできた。which gemwhich rubygem listgem install docker-composegem install docker-syncでOK
2019/09/02
golang validation array size
gte
ids []int `json:"ids,omitempty" binding:"required,gte=1"`
2019/07/05
E talking 20190703
the statute(法令) of limitations
prescription 処方箋、取得時効
How many year is the statute of limitation in France.
For example, I borrowed 1000 yen from you. and you never asked me to return your money for ten years.
then i will not have to return your money because of the statute fo limitations.
you will lose your right.
For example, A man has three sons and He saved 3000 yen. When he die ,How much will his each son will get from him .
That is a problem about inherence
i don’t remember 覚えていない
i can’t remember 思い出せない
I will play guitar when i really have other things to do. The priority is low.
estate財産, real estate不動産
certification 資格
By the law ,there must be one employee with certification per 5 employees
employee 従業員
employer 雇用主
supe rior 上長
borrow a book from you. (無料?)
you lend you a book
rent you the book(有料)
They told me that my superior said many bod things about me when they had lunch together.
Then somedays later ,i had a chance to have lunch together with my superior.
And i certified that bad things with my superior , he known nothing about that.
i think they just wanted to make the relationship bad
in a short term, i met my wife by chance for many times.and we talked a lot .