日常记录

nodejs

registry=http://registry.npmjs.org/
registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist

yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass

git模块

Command line instructions
You can also upload existing files from your computer using the instructions below.

Git global setup
git config --global user.name "lambert.wang"
git config --global user.email "lambert.wang@qq.com"

Create a new repository
git clone http://192.168.1.2/xxx.git
cd sino-app-parent
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

Push an existing folder
cd existing_folder
git init
git remote add origin http://192.168.1.2/xxx.git
git add .
git commit -m "Initial commit"
git push -u origin master

Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin http://192.168.1.1/xxx.git
git push -u origin --all
git push -u origin --tags

git config --global user.name "lambert.wang"
git config --global user.email "lambert.wang@crediteyes.com"

git config http.proxy 'socks5://127.0.0.1:3128'
git config https.proxy 'socks5://127.0.0.1:3128'

git config --unset http.proxy
git config --unset https.proxy

git config --global --unset http.proxy
git config --global --unset https.proxy

22 清除远程缓存分支
git remote prune origin
or
git fetch -p

git cherry -v origin/master

删除本地tag:

git tag -d v20190514
删除远程tag:
git push origin :refs/tags/v20190514
git config --global http.proxy 'socks5://127.0.0.1:3128'
git config --global https.proxy 'socks5://127.0.0.1:3128'
git config --global --unset http.proxy
git config --global --unset https.proxy

强制更新覆盖本地
git fetch --all
git reset --hard origin/master
git pull

vim /etc/gitlab/gitlab.rb

gitlab-ctl stop
gitlab-ctl reconfigure
gitlab-ctl start

nginx 模块

server {
listen 443;
server_name 192.168.1.1;

ssl on;
ssl_certificate /usr/local/nginx/conf/ssl/server-1.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/server.key;

ssl_protocols  SSLv2 SSLv3 TLSv1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

location =/ {
		rewrite / /loginmain/;
}
location /desk/{
		proxy_pass http://desk;
}

}

mysql 模块

GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'zzzzzz'
flush privileges;
create user user01@'localhost' identified by 'zzzzzz';
create user user02@'%' identified by 'zzzzzz'
GRANT ALL PRIVILEGES ON . TO zhangsan@"%" IDENTIFIED BY "lisi";

ALTER TABLE t_brand_order ADD COLUMN return_time datetime DEFAULT null comment '订单返回时间';
ALTER TABLE t_tenants_order ADD COLUMN return_time datetime DEFAULT null comment '订单返回时间';
可以用这个命令:

show index from table_name;
select database();
SHOW CREATE TABLE tbl_name

//修改字段长度
alter table table1 modify name char(15);
//修改字段名称以及长度
alter table t_tenants_order change legalcard_num legal_card_num text(100);
alter table t_tenants_order_result change legalcard_num legal_card_num text(100);
alter table table1 change id id int(10);
mysqldump -uroot -p zentao > /home/credit/zentao.sql
my.ini
default-time_zone='+8:00'
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
如果你想允许用户myuser从ip为192.168.1.64的主机连接到mysql服务器,并使用root作为密码
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

输入命令:FLUSH PRIVILEGES;

html字符实体

显示结果———-描述———-实体名称———-实体编号
--------------------空格------------- --------- 
<--------------------小于号-----------<-----------<

--------------------大于号----------->----------->
&--------------------和号------------&-----------&
"--------------------引号------------" ---------"
'--------------------撇号------------'----------'(IE不支持)
¢--------------------分-------------¢----------¢
£--------------------镑--------------£---------£
¥--------------------日圆------------¥-----------¥
€--------------------欧元------------€----------€
§--------------------小节------------§----------§
©--------------------版权------------©----------©
®--------------------注册商标---------®-----------®
™--------------------商标------------™----------™
×--------------------乘号------------×----------×
÷--------------------除号------------÷---------÷

db.createUser(
{
user:"credit_simulation",
pwd:"XXXXX",
roles:[{role:"readWrite",db:"xxxxxx"}]
}
)
db.createUser({user:'xxxxxx',pwd:'XXXXX',roles:['readWrite']})

原文地址:https://www.cnblogs.com/lambertwe/p/14446881.html