mysql notes

read-only user Adding the new MySQL user Connect to your database as root, then add your new user like so: CREATE USER ‘lele’@‘%’ IDENTIFIED BY ‘lele_lelelele’; The % here means the user ‘tester’ connecting from any host, you can place a network hostname here instead if you want to restrict access further. Naturally you will also want to substitute password with something a little stronger ;-) Now run the following

django notes

user python manage.py createsuperuser cors Using CORS django-cors-headers django debug $ python manage.py shell >>> import django >>> django.setup() from polls.models import Question, Choice >>> q = Question(question_text=“What’s new?”, pub_date=timezone.now()) Save the object into the database. You have to call save() explicitly. q.save() migrate 有时候, 你需要修改的model字段有约束, 例如外健,

kubernetes notes

Dev Kubernetes项目对于开发人员的支持做的很好, 再Github仓库有开放指南, 非常详细. 简单记录以下过程 Kubernetes项目开发语

golang notes

配置 pacman -S go export GOPATH=~/workspace/go/go-tools/ go get github.com/mailgun/godebug go get github.com/nsf/gocode go get github.com/rogpeppe/godef go get github.com/tools/godep go get golang.org/x/tools/cmd/goimports go get golang.org/x/tools/cmd/oracle export PATH=$PATH:~/workspace/go/go-tools/bin 不建议在bash_profile里面设置GOPATH,Go的依赖问题容易导致冲突,建议

git notes

squash 在你的work branch完成某个feature之后,你需要merge到master: git checkout master git merge workbranch 这种做法的问题在于,一般你完成某个fea