Skip to content

Instantly share code, notes, and snippets.

View kuozo's full-sized avatar
:shipit:
Focusing

Kollin kuozo

:shipit:
Focusing
View GitHub Profile
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active June 1, 2024 05:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
---
# Python 简介
@su27 and @menghan
---

What is Python?

Python: 优雅而健壮的编程语言

  • 高级

  • 易学易读易维护

@qingfeng
qingfeng / django_jinja.py
Created July 29, 2011 13:48 — forked from rozza/django_jinja.py
Django 1.2 and Jinja2 loader
"""
Using Jinja2 with Django 1.2
Based on: http://djangosnippets.org/snippets/2063/
To use:
* Add this template loader to settings: `TEMPLATE_LOADERS`
* Add template dirs to settings: `JINJA2_TEMPLATE_DIRS`
If in template debug mode - we fire the template rendered signal, which allows
debugging the context with the debug toolbar. Viewing source currently doesnt
@vls
vls / timeit.py
Created July 15, 2011 01:13
python time test decorator function
import time, functools
def timeit(func):
@functools.wraps(func)
def __do__(*args,**kwargs):
start = time.time()
result= func(*args,**kwargs)
print '%s used time %ss'%(func.__name__,time.time()-start)
return result
return __do__
@binux
binux / pool.py
Created May 26, 2011 06:39
使用threading+queue的线程池封装,使用对象在每个对象中保存独立的连接,可以安全地使用ctrl-c打断
# !/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import time
import Queue
import threading
import traceback
class ExitException(Exception):