Skip to content

Instantly share code, notes, and snippets.

iTerm2 – Useful Shortcuts (Mac OS X)

with a hat tip to Sublime Text 2 Shortcuts

The Awesome

⌘; autocomplete
⌘⌥B instant replay
⌘⌥E search across all tabs
@songxiaofeng1981
songxiaofeng1981 / gist:3916243
Created October 19, 2012 04:28
this is a test
this is a test
@songxiaofeng1981
songxiaofeng1981 / snippet
Created October 25, 2012 05:32
HTML: starting snippet
<snippet>
<content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hello</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.md</scope>
<scope>song</scope>
</snippet>
@songxiaofeng1981
songxiaofeng1981 / mongo.py
Created October 25, 2012 06:08 — forked from kennethreitz/mongo.py
pymong: pymongo
import os
import pymongo
MONGO_URL = os.environ.get('MONGOHQ_URL')
if MONGO_URL:
# Get a connection
conn = pymongo.Connection(MONGO_URL)
# Get the database
@songxiaofeng1981
songxiaofeng1981 / testpicture.md
Created October 25, 2012 12:16
markdown: insert image
<snippet>
<content><![CDATA[
Hello, song ${1:this} is a ${2:snippet}.
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hello</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.python</scope>
</snippet>
//增加对象构造函数,call,apply 函数。 匿名函数,内存模型。
var Class = function() {
var klass = function() {
if(typeof klass.constructor == 'function'){
// klass.constructor (arguments[0])
console.log(arguments[0]);
console.log(arguments[1]);
// console.log(arguments[2]);
@songxiaofeng1981
songxiaofeng1981 / javascript:learn
Created November 11, 2012 02:58
learn javascript
var Class = function () {
var klass = function () {
this.initialize.apply(this,arguments) //this中没有init,找原型
};
klass.fn = klass.prototype;//todo 污染
return klass;
};