这是我常用的 fab 部署脚本的改写通用版本。
可能对大型项目没起作用,但是对于小项目,作用还是很大,所以发出来写个文章分享下。
| pid file = /var/run/rsyncd.pid | |
| port = 873 | |
| address = 172.28.150.23 | |
| uid = jason | |
| gid = jason | |
| use chroot = yes | |
| read only = yes | |
| hosts allow = 172.28.150.26 | |
| hosts deny = * | |
| max connections = 20 |
| #!/usr/bin/tclsh8.5 | |
| # | |
| # Usage: git-unmerged branch1 branch2 | |
| # | |
| # Shows all the non-common commits in the two branches, where non-common | |
| # commits means simply commits with a unique commit *message*. | |
| proc getlog branch { | |
| lrange [split [exec git log $branch --oneline] "\n"] 0 400 | |
| } |
| " _ | |
| " ___ __ _ __ _| | ___ | |
| " / _ \/ _` |/ _` | |/ _ \ | |
| "| __/ (_| | (_| | | __/ | |
| " \___|\__,_|\__, |_|\___| | |
| " |___/ | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " => General | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Responsive Design Testing</title> | |
| <style> | |
| body { margin: 20px; font-family: sans-serif; overflow-x: scroll; } | |
| .wrapper { width: 6000px; } | |
| .frame { float: left; } | |
| h2 { margin: 0 0 5px 0; } |
| # coding: utf-8 | |
| try: | |
| import cPickle as pickle | |
| except ImportError: | |
| import pickle | |
| try: | |
| import hashlib | |
| sha1 = hashlib.sha1 |
| "use strict"; | |
| var mongoose = require('mongoose'), | |
| Schema = mongoose.Schema; | |
| // ==== connect to database ==== | |
| mongoose.connect('mongodb://localhost/temp'); | |
| import unittest, os, os.path, sys, urllib | |
| import tornado.database | |
| import tornado.options | |
| from tornado.options import options | |
| from tornado.testing import AsyncHTTPTestCase | |
| # add application root to sys.path | |
| APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
| sys.path.append(os.path.join(APP_ROOT, '..')) |
| @startuml | |
| skinparam handwritten true | |
| "You/Browser" -> slack.com: 1. I would like to access my files on Google Drive via your interface. | |
| slack.com -> "You/Browser": 2. You should apply the "Authorization Code" from Google for me first. | |
| "You/Browser" -> account.google.com: 3. I would like to permit slack.com to access my files. | |
| account.google.com -> "You/Browser": 4. Are you sure? | |
| "You/Browser" -> account.google.com: 5. [Y] | |
| account.google.com -> "You/Browser": 6. Okay. Here is the "Authorization Code." Plz give it back to slack.com now. | |
| "You/Browser" -> slack.com: 7. You can do what I asked now (with the Authorization Code which is just received from Google.) | |
| slack.com -> account.google.com: 8. I would like to exchange the "Authorization Code" for the "Access Token." |
This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.
| Function | Shortcut |
|---|---|
| Previous Tab | ⌘+ Left Arrow |
| Next Tab | ⌘+ Right Arrow |
| Go to Tab | ⌘ + Number |