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
#!/bin/bash | |
compose_file_path=$1 | |
project_name=$2 | |
backup_path=$3 | |
function backup_volume { | |
volume_name=$1 | |
backup_destination=$2 |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
var IMAGE_MIME_REGEX = /^image\/(p?jpeg|gif|png)$/i; | |
var loadImage = function (file) { | |
var reader = new FileReader(); | |
reader.onload = function(e){ | |
var img = document.createElement('img'); | |
img.src = e.target.result; | |
var range = window.getSelection().getRangeAt(0); | |
range.deleteContents(); |
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: "3" | |
services: | |
roach1: | |
container_name: roach1 | |
image: cockroachdb/cockroach:v1.1.3 | |
command: start --insecure | |
ports: | |
- "26257:26257" | |
- "8080:8080" | |
volumes: |
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 you don‘t want to build it youself, you can try `docker pull killercai/postgres`. | |
FROM healthcheck/postgres:latest | |
# China debian mirror | |
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list | |
RUN apt-get clean && apt-get update | |
RUN apt-get install -y wget git build-essential libpq-dev python-dev postgresql-server-dev-all | |
# SCWS (Simple Chinese Word Segmentation library) | |
RUN cd /tmp && wget -q -O - http://www.xunsearch.com/scws/down/scws-1.2.1.tar.bz2 | tar xjf - && cd scws-1.2.1 && ./configure && make install | |
# zhpaser (postgres plugin) |
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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder] |
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
## python 3.7 install | |
-> sudo apt update | |
-> sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget | |
-> sudo apt install software-properties-common | |
-> sudo add-apt-repository ppa:deadsnakes/ppa | |
-> sudo apt update | |
-> sudo apt install python3.7 | |
-> python3.7 --version | |
## pip3 install |
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
Naming file |