http://www.cheatography.com/davechild/cheat-sheets/linux-command-line/
删除文件夹(非空)
rm -rf xxx
http://www.cheatography.com/davechild/cheat-sheets/linux-command-line/
删除文件夹(非空)
rm -rf xxx
本地环境为Windows。
###0. 下载putty
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
putty
和 puttygen
puttygen
生成ssh public key,保存至服务商配置处###1. 配置服务器
var superagent = require('superagent'); | |
var async = require('async'); | |
/** | |
* GET / | |
* Home page. | |
*/ | |
exports.index = function(req, res) { | |
superagent.get('https://hacker-news.firebaseio.com/v0/topstories.json') |
blockquote { | |
margin-left: 50px; | |
border: none; | |
font: 18px/1.8 "times new roman", "微软雅黑"; | |
margin-top: -150px; | |
margin-bottom: -160px; | |
} | |
blockquote:before { | |
content: open-quote; | |
font-size: 100px; |
##初始配置
git config --global user.name "pockry"
git config --global user.email [email protected]
##个人开发
git clone
function Authenticator(){ | |
this._serializers = []; | |
} | |
Authenticator.prototype.serializeUser = function(fn, req, done) { | |
if (typeof fn === 'function') { | |
return this._serializers.push(fn); | |
} | |
var user = fn; | |
if (typeof req === 'function') { | |
done = req; |
##Proposal:
Change angular-seed, yeoman/generator-angular, (the Google-internal example go/nghellostyle), and other demo apps to model the following directory structure. Eventually, develop tooling to make development more efficient using assumptions based on these conventions. Motivation:
Our toy and demo apps currently group files functionally (all views together, all css together, etc...) rather than structurally (all elements of a view together, all common elements together, etc...)
When used in a real larger scale app (e.g. Doubleclick For Advertisers), readability is improved by making the directory and app structure consistent with the architectural design of the app. We also want to be able to develop tools to make app creation and management easier, and this is simplified with a common structure.
This proposal outlines a more functional structure based on a repeating hierarchy and some use-case examples.
<div id="content"> | |
<div id="content-nav">目录</div> | |
<div class="content-core"> | |
<p>文章正文</p> | |
<h2>小标题</h2> | |
<p>dddd</p> | |
</div> | |
</div> |
var express = require('express') | |
, passport = require('passport') | |
, util = require('util') | |
, GitHubStrategy = require('passport-github').Strategy; | |
var GITHUB_CLIENT_ID = "--insert-github-client-id-here--" | |
var GITHUB_CLIENT_SECRET = "--insert-github-client-secret-here--"; | |
// Passport session setup. | |
// To support persistent login sessions, Passport needs to be able to | |
// serialize users into and deserialize users out of the session. Typically, | |
// this will be as simple as storing the user ID when serializing, and finding |
/** | |
* 例程:对象数组的二维比较和插入 | |
* Author: pockry | |
* 说明:需要插入的数组已经是排序好的 | |
*/ | |
var arr = [ | |
{y: 2014, m: 10}, | |
{y: 2014, m: 7}, | |
{y: 2014, m: 1}, |