Skip to content

Instantly share code, notes, and snippets.

@jpzhu
jpzhu / ascii.txt
Created December 8, 2017 01:56
字符
ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ
ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ
①②③④⑤⑥⑦⑧⑨⓪
⊖⊜⊕⊙⊛
@jpzhu
jpzhu / 域名转入.txt
Created November 14, 2017 14:43
aws domain dns
1. 由域名转入方生成一个域名转移码
2. 将域名转入码输入aws的转入请求中
3. aws 会给你发邮件(发到原来域名注册服务的邮箱)确认你准备把域名转出,你说好,活动继续
4. 原域名收到aws请求后,会给发邮件。说你的域名要转出了哦,确认下。 好吧,继续
5. 等,等,等 几天后就转完了。
6. 你开始在aws里修改你自己的域名record,改了又改,然而并不起作用
7. 此时你需要讲你的NS(DNS 服务器)也换到aws,这时aws会将你在他那里的改动同步全球
【ns信息可以在whois服务里查看到】
@jpzhu
jpzhu / mysql.txt
Last active November 15, 2017 03:30
mysql ssh vpn
http://mingxinglai.com/cn/2015/09/connect-mysql-via-ssh-tunnel/
使用SSH隧道连接MYSQL
https://blog.fundebug.com/2017/04/24/ssh-port-forwarding/
玩转SSH端口转发
MySQL 使用ssh连接例子
ssh -fCPN -L localhost:8964:127.0.0.1:3306 ss-manager
/usr/local/mysql/bin/mysql -hlocalhost -uroot --port=8964 -p'你的密码'
@jpzhu
jpzhu / yum.command
Created September 7, 2017 12:22
yum repo
yum install epel-release
yum-config-manager --enable epel
yum –-enablerepo=epel install zabbix
yum makecache
yum repolist
brew remove groovy
brew install groovysdk
Point IntelliJ to the installed directory, e.g. /usr/local/Cellar/groovysdk/2.4.7/libexec
@jpzhu
jpzhu / timedatectl.txt
Created July 7, 2017 09:17
timezone ntp
# timedatectl list-timezones
##*** Grep possible Asian timezones ***##
# timedatectl list-timezones | grep Asia
## 列出可用的时区 (传统用法)
# ln -s /usr/share/zoneinfo
## 修改时区,参数来自于上面的输出
# timedatectl set-timezone America/Chicago
@jpzhu
jpzhu / ssh_access_control.txt
Last active December 13, 2018 09:38
sshd root ssh
# 禁止密码登录
PasswordAuthentication no
# 禁止Root登录
PermitRootLogin no
# 网开一面
Match Address 172.xx.yy.zz
PermitRootLogin yes
alternatives --config java
@jpzhu
jpzhu / mysql_utf8.txt
Last active June 2, 2017 12:11
mysql utf8 support
1. #数据库的uf8默认编码支持,建表的时候设置,如果开始没设置可以重置。
mysqldump -uusername -ppassword -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database -B dbname > dump.sql
cp dump.sql dump-fixed.sql
vim dump-fixed.sql
:%s/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci/
:%s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/
:wq
mysql -uusername -ppassword < dump-fixed.sql
@jpzhu
jpzhu / mysql_password_getback.txt
Created June 1, 2017 09:49
mysql password mac
1. 停止mysql的自动启动。
# 停止或恢复,具体路径需要根据自己机器做相应修改
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql.plist
ref:https://stackoverflow.com/questions/100948/how-do-you-stop-mysql-on-a-mac-os-install
2. 杀死mysqld进程,如果会持续重启可能需要重启机器