Skip to content

Instantly share code, notes, and snippets.

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

Demo runningdemo

🏠
Working from home
View GitHub Profile
syntax on
set noerrorbells
set shiftwidth=2
set expandtab
set smartindent
set nu
set nowrap
set smartcase
set noswapfile
set nobackup
@runningdemo
runningdemo / tmux-cheatsheet.markdown
Created August 14, 2017 04:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@runningdemo
runningdemo / better-nodejs-require-paths.md
Created May 26, 2016 08:27 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@runningdemo
runningdemo / npm-f3-install.sh
Created April 8, 2016 14:46 — forked from SuperPaintman/npm-f3-install.sh
NPM install for low RAM machins. And "npm install ... killed" problem
#!/bin/bash
#
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com>
#
###
# Constants
###
RETVAL=0
NSString *sql = [NSString stringWithFormat:@"insert INTO bookmark (href, title, tags, notes) values ('%@', '%@', '%@', '%@');",
bookmark.href,
bookmark.title,
[bookmark.tags componentsJoinedByString:@","],
bookmark.notes
];
[self.db executeUpdate:@"insert INTO bookmark (href, title, tags, notes) values (?, ?, ?, ?)", bookmark.href, bookmark.title, bookmark.tags, bookmark.notes];
// Generated on 2014-07-08 using generator-angular 0.9.3
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var modRewrite = require('connect-modrewrite');

repository的组成

local repository consists of three "trees".

first:

Git Merge

doucment

解决了冲突的文件后,需要将文件加入暂存区. git add 这样才能说明解决了confict.

Terms

  • CALayer
  • CALayer's sublayer

Basic CALayer property

Advantage of layer base drawing

5 keys defination:

⌘ Command key ⌃ Control key ⌥ Option key ⇧ Shift Key ⇪ Caps Lock Fn Function Key

Key or Key Combination Semantic