This file contains 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/sh | |
# how to use: | |
# ./backup.sh mysql_prod root rootpw mydb /var/log/backup.sql | |
# crontab example: | |
# 0 0 * * * /backup.sh mysql_prod root rootpw mydb /var/log/backup.sql | |
# restore example: | |
# cat backup.sql | docker exec -i [container_name] /usr/bin/mysql -u [mysql_user] --password=[mysql_password] [database_name] |
This file contains 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/sh | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 | |
openssl rsa -in key.pem -out pri.key |
This file contains 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
# -*- coding: utf-8 -*- | |
# __author__ = "Natata" | |
# __copyright__ = "Copyright 2019, Natata" | |
# __credits__ = ["Natata"] | |
# __license__ = "MIT" | |
# __version__ = "0.0.1" | |
# __maintainer__ = "Natata" | |
# __email__ = "ph2.71828@gmail.com" | |
# __status__ = "dev" |
This file contains 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
func TravelStruct(v interface{}, f func(fieldName string, tag reflect.StructTag)) { | |
travelStruct(reflect.ValueOf(v).Type(), f) | |
} | |
func travelStruct(t reflect.Type, f func(fieldName string, tag reflect.StructTag)) { | |
t = PtrToType(t) | |
if t.Kind() != reflect.Struct { | |
return | |
} |
This file contains 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
set nocompatible " be iMproved, required | |
filetype off " required | |
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-fugitive', { 'for': 'go'} | |
Plug 'fatih/vim-go', { 'for': 'go'} | |
Plug 'majutsushi/tagbar' | |
Plug 'scrooloose/nerdtree' | |
Plug 'fatih/molokai' |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys |
OlderNewer