⌘T | 切換檔案 |
⌘⌃P | 切換專案 |
⌘R | 畫面切換到 method |
⌃G | 畫面切換到指定行數 |
⌘KB | 關閉 / 開啟側邊欄 |
⌘⇧P | 開啟指令控制面板 |
This file contains 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
git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch |
This file contains 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
# I'm a Vim user, this makes navigation easier | |
setw -g mode-keys vi # I especially like being able to search with /,? when in copy-mode | |
unbind-key j | |
bind-key j select-pane -D # Similar to 'C-w j' to navigate windows in Vim | |
unbind-key k | |
bind-key k select-pane -U | |
unbind-key h | |
bind-key h select-pane -L | |
unbind-key l | |
bind-key l select-pane -R |
This file contains 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
//http://codewars.net/304/layer-clipping-in-cocos2d-x/ | |
void CCClippingLayer::visit() | |
{ | |
// quick return if not visible | |
if (!getIsVisible()) | |
{ | |
return; | |
} |
This file contains 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
void Card::flipAction() { | |
CCSize winSize = CCDirector::sharedDirector()->getWinSize(); | |
CCSprite* card = CCSprite::spriteWithFile("card_face.png"); | |
card->setPosition(ccp(winSize.width/2, winSize.height/2)); | |
this->addChild(card, CARD_FACE_TAG, CARD_FACE_TAG); | |
card->setVisible(false); | |
CCSprite* card2 = CCSprite::spriteWithFile("card.png"); | |
card2->setPosition(card->getPosition()); |
This file contains 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
/** | |
* 分析豆瓣阅读查看电子书的逻辑 | |
* | |
* 主要用到的JavaScript为 | |
* 1. OzJS(管理模块) | |
* 2. jQuery(base库) | |
* 3. Backbone.js(web application框架) | |
* | |
* 过程分析 | |
* -------- |
This file contains 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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
Edit: Apparently the sass file was removed from the latest versions of Font-Awesome... You can still download the sass file from GitHub here
- Download Font Awesome source
- Take the file sass/font-awesome.sass and put it in your octopress sass folder
- Rename it to _font-awesome.sass
- Create a directory 'octopress/source/font' and put the 4 font files there (ttf, svg, eot and woff).
- In your stylesheet (sass/screen.scss):
@import font-awesome
This file contains 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
local redis_c = require "resty.redis" | |
local ok, new_tab = pcall(require, "table.new") | |
if not ok or type(new_tab) ~= "function" then | |
new_tab = function (narr, nrec) return {} end | |
end | |
local _M = new_tab(0, 155) |
This file contains 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
local M = {} | |
function M.test(...) | |
print(...) | |
end | |
return M |
OlderNewer