docker run -v pwd:/gen -v pwd/api:/api grpc/go protoc -I /api/ /api/gerbang.proto --go_out=plugins=grpc:/gen
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "appname", | |
| "request": "launch", | |
| "type": "dart" | |
| }, | |
| { | |
| "name": "Android", |
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 IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| // Use `flutter devices` to get your devices id | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "appname", |
Error creating overlay mount to /var/lib/docker/overlay2/9ed4841a2d4212795c1cce322e90a058a38602aabe498d944e31f7b902c31313/merged: invalid argument
echo '{ "storage-driver": "devicemapper" }' | sudo tee /etc/docker/daemon.json
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
| ``` | |
| if (_scrollController.offset <= | |
| _scrollController.position.minScrollExtent && | |
| !_scrollController.position.outOfRange) { | |
| # Code here | |
| } | |
| ``` |
Backup:
mysqldump --column-statistics=0 --set-gtid-purged=OFF -h<Host> -u<User> -p<Password> <db_name> > backup.sql
Restore:
mysql -u<User> -p<Password> <dest_db> < backup.sql
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 db | |
| import "github.com/jackc/pgx" | |
| // InitPostgres func | |
| func InitPostgres() (dbConnPool *pgx.ConnPool) { | |
| conf := getConfig() | |
| var err error | |
| pgxConf := &pgx.ConnConfig{ |
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 db | |
| import ( | |
| "fmt" | |
| "github.com/jinzhu/gorm" | |
| _ "github.com/jinzhu/gorm/dialects/postgres" | |
| ) | |
| // InitPostgres func |
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 db | |
| import ( | |
| "fmt" | |
| "github.com/jinzhu/gorm" | |
| _ "github.com/jinzhu/gorm/dialects/mysql" | |
| ) | |
| // InitMysql func |
None-alpine:
echo <TIMEZONE> > /etc/timezone && ln -sf /usr/share/zoneinfo/<TIMEZONE> /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
// Before
Current default time zone: 'Etc/UTC'
Local time is now: Mon May 11 08:21:58 UTC 2020.