I hereby claim:
- I am shunfan on github.
- I am shunfan (https://keybase.io/shunfan) on keybase.
- I have a public key ASBUsJ6Y1krygFbwur1FW86m2zrFyf6ZlowF6GT9hMIx0wo
To claim this, I am signing this object:
| Squash commits on branch into one commit: | |
| git log --oneline | |
| git rebase -i HEAD~<number of commits back to include + 1> | |
| # leave extra commit as "pick" | |
| # leave oldest commit for this branch as "pick" | |
| # change all others to s | |
| # save and exit | |
| # edit commit message | |
| git push —force |
I hereby claim:
To claim this, I am signing this object:
| # Enter this command to create a sudoers override/include file: | |
| # sudo visudo -f /etc/sudoers.d/nginx_overrides | |
| # (Make sure you actually have this in your /etc/sudoers - Run `sudo visudo` to check) | |
| # #includedir /etc/sudoers.d | |
| # This file assumes your deployment user is `deploy` | |
| # Nginx Commands | |
| Cmnd_Alias NGINX_RESTART = /usr/sbin/service nginx restart |
| #!/usr/bin/ruby | |
| # INSTALL: gem install faraday | |
| require 'faraday' | |
| Faraday::Utils.default_params_encoder = Faraday::FlatParamsEncoder | |
| username = '' | |
| password = '' | |
| term = '' |
| def word_count(content) | |
| result = Hash.new(0) | |
| content.downcase.scan(/\w+/) { |word| result[word] += 1 } | |
| result | |
| end |
| # http://v2ex.com/t/74002 | |
| list = [0, 0, 0, | |
| 2295, 2295, 1530, | |
| 0, 0, 0, 0, 0, | |
| 1020, 1530, 1530, 1530, 1530, 2295, 2550, 1785, | |
| 0, 0, 0, 0, 0, | |
| 1020, 1530, 1530, 1530, 1530, 2295, 2550, | |
| 0, 0, 0, 0, 0, | |
| 1275, 1530, 1530, 1530, 1530, 1530, | |
| 0, 0, 0, 0, 0, 0] |
| # coding=utf-8 | |
| """ | |
| Slugify for Chinese | |
| 没有优化多音字 | |
| 优化多音字的项目有: | |
| https://github.com/jiedan/chinese_pinyin | |
| """ | |
| import re | |
| import unidecode |