- u/^R/U
- :undo + <num> / g- / g+ : 前者用于知道跳转去向,后者用于不知道的
- :undolist
- :earlier 10s / 10h / 1m / :later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twisted.internet import reactor, protocol | |
| from twisted.python import log | |
| class BlockingProtocol(protocol.Protocol): | |
| connection_count = 0 | |
| def connectionMade(self): | |
| log.msg('new connection(%d connection has been made)' % self.connection_count) | |
| BlockingProtocol.connection_count += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from twisted.internet import reactor, defer, protocol | |
| from twisted.protocols import basic | |
| from twisted.python import log | |
| class LongTimeProtocol(basic.LineReceiver): | |
git log -S'foo()' # search changesets which changes 'foo()'
git diff master..test # diff between tips of the two branches
git diff master...test # diff from common ancestor to test
git format-patch master..test # 加不加 '..' 是一样的
git show v2.5:fs/locks.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| type Handle interface { | |
| ServeHTTP(c *int, req *int) | |
| } | |
| func NotFound(c *int, req *int) { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import gevent | |
| request_times = [] | |
| def calc_response_time(func): | |
| def _(env, start_response): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bench: | |
| go test benchmark_test.go --bench=. | tee result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (st)menghan@MenghanMac:/tmp/t$ python setup.py install | |
| running install | |
| running bdist_egg | |
| running egg_info | |
| writing requirements to ExampleProject.egg-info/requires.txt | |
| writing ExampleProject.egg-info/PKG-INFO | |
| writing namespace_packages to ExampleProject.egg-info/namespace_packages.txt | |
| writing top-level names to ExampleProject.egg-info/top_level.txt | |
| writing dependency_links to ExampleProject.egg-info/dependency_links.txt | |
| WARNING: example is a namespace package, but its __init__.py does |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| from sqlalchemy import create_engine, Column, Integer, DECIMAL, DATE, String, ForeignKey, Float, TEXT | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker, relationship, backref | |
| db_schema = 'sqlite:///sqlite.db' | |
| debug = True | |
| engine = create_engine(db_schema, echo=debug) | |
| create_session = sessionmaker(bind=engine) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PATH := $(PATH):/tmp/t | |
| export PATH | |
| t: | |
| env | |
| testcmd |
OlderNewer