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
package db | |
import "github.com/jackc/pgx" | |
// InitPostgres func | |
func InitPostgres() (dbConnPool *pgx.ConnPool) { | |
conf := getConfig() | |
var err error | |
pgxConf := &pgx.ConnConfig{ |
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
``` | |
if (_scrollController.offset <= | |
_scrollController.position.minScrollExtent && | |
!_scrollController.position.outOfRange) { | |
# Code here | |
} | |
``` |
Error creating overlay mount to /var/lib/docker/overlay2/9ed4841a2d4212795c1cce322e90a058a38602aabe498d944e31f7b902c31313/merged: invalid argument
echo '{ "storage-driver": "devicemapper" }' | sudo tee /etc/docker/daemon.json
{ | |
// 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", |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "appname", | |
"request": "launch", | |
"type": "dart" | |
}, | |
{ | |
"name": "Android", |
import 'dart:ui'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/foundation.dart'; | |
class CacheMemoryImageProvider extends ImageProvider<CacheMemoryImageProvider> { | |
final String tag; //the cache id use to get cache | |
final Uint8List img; //the bytes of image to cache | |
CacheMemoryImageProvider(this.tag, this.img); |
import 'package:intl/intl.dart'; | |
/// An utility calss that manages specific formats. | |
class DateFormats { | |
/// The [DateFormat] 'yyyy-MM-dd HH:mm:ss'. | |
static final fullDateFormat = new DateFormat('yyyy-MM-dd HH:mm:ss'); | |
/// The [DateFormat] 'yyyy/MM/dd'. | |
static final onlyDayDateFormat = new DateFormat('yyyy/MM/dd'); |
SCP Over :
scp "ProxyCommand ssh <jumphost> -W %h:%p" <src> <dest>
RSYNC Over :
rsync -azv -P -e 'ssh -o "ProxyCommand ssh -A <jumphost> -W %h:%p"' <src> <dest>