Skip to content

Instantly share code, notes, and snippets.

View qinnnnnnnn's full-sized avatar
🏠
Working from home

Qinnnnnnnn qinnnnnnnn

🏠
Working from home
View GitHub Profile
@qinnnnnnnn
qinnnnnnnn / tmux-cheatsheet.markdown
Created December 16, 2015 07:58 — forked from elrrrrrrr/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Tiny VIM tutor .

移动光标

  • hjkl -> 左下上右

重复

  • number command object -> 重复
@qinnnnnnnn
qinnnnnnnn / html5-api.md
Last active August 29, 2015 14:16
5 html APIs

#####全屏API(Fullscreen API)

该API允许开发者以编程方式将Web应用程序全屏运行,使Web应用程序更像本地应用程序。

// 找到适合浏览器的全屏方法  
function launchFullScreen(element) {  
  if(element.requestFullScreen) {  
    element.requestFullScreen();  
  } else if(element.mozRequestFullScreen) {  
@qinnnnnnnn
qinnnnnnnn / alias.md
Created March 4, 2015 05:19
.zshrc alias
alias c="clear"
alias nw="/Applications/node-webkit-v0.8.6-osx-ia32/node-webkit.app/Contents/MacOS/node-webkit"
alias tomstart="sudo sh /Users/qin/Library/tomcat/bin/startup.sh"
alias tomstop="sudo sh /Users/qin/Library/tomcat/bin/shutdown.sh"

get Django version

python -c "import django; print(django.get_version())"
@qinnnnnnnn
qinnnnnnnn / pip.md
Last active August 29, 2015 14:15
Installing pip on Mac OS X

####Installing pip on Mac OS X

sudo easy_install pip

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2

var gulp = require('gulp'),
stylus = require('gulp-stylus'),
jade = require('gulp-jade');
jademod = require('jade2mod');
var paths = {
stylus: ['stylus/*.styl'],
html: ['html/*.html'],
jade: ['jade/*.jade'],
engine: ['jade/engine/*.jade']

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->