Ifttt Note

IFTTT Maker A simple test: import os def test(): """ Test ifttt maker the command template is: curl -X POST -H "Content-Type:application/json" -d '{"value1":"第一个参数","value2":"第二个","value2":"第三个"}' 'https://maker.ifttt.com/trigger/test/with/key/your_key' :param: :return: """ key = 'csO7ZoutwPzCc_Your_key' arg1 = '第一' arg2 = '第二' arg3 = '一二三四五六七八九十' template = [ 'curl -X POST -H "Content-Type:application/json" -d ', "'{", '"value1":"{}","value2":"{}","value3":"{}"'.format(arg1,arg2,arg3), "}' ", 'https://maker.ifttt.com/trigger/test/with/key/', key ] os.system(''.join(template)) if __name__ == '__main__': test()

May 21, 2017 · 1 min · Me

Semantic Note

Install Install NodeJs: brew install node Install Gulp: npm install -g gulp Install Semantic UI: npm install semantic-ui --save cd semantic/ gulp build Include in Your HTML: <link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css"> <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <script src="semantic/dist/semantic.min.js"></script> Updating: npm update

May 11, 2017 · 1 min · Me

How to start a python3 project

If we want to start a new python3 project, What we should do first? start a git project online git clone your_git_project_url mkvirtualenv -p python3 project_name pip install your_project_need_package pip freeze > requirements.txt(use pip install -r requirements.txt to restore)

May 5, 2017 · 1 min · Me

IDE in terminal for Python

Tmux Vim To be continued…

April 14, 2017 · 1 min · Me

Git Note

基本用法 添加文件: git add README test.rb LICENSE 提交变动: git commit -m 'initial commit of my project' git commit -a -m 'made a change' 列出当前所有分支,前面带星号的是当前所有分支: git branch 查看各个分支最后一个提交对象的信息: git branch -v: 创建分支: git branch test 切换分支: git checkout test 创建并切换到新分支: git checkout -b iss53 合并分支,下例把 hotfix 分支并入 master 分支: git checkout master git merge hotfix 删除分支: git branch -d hotfix 查询合并时产生的冲突: git status 可视化的解决冲突的工具: git mergetool 要从该清单中筛选出你已经(或尚未)与当前分支合并的分支, 可以用 –merge 和 –no-merged 选项(Git 1....

February 11, 2017 · 3 min · Me