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
package com.linkedin.dust.renderer; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.io.Writer; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.JavaScriptException; |
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
// | |
// Usage: require('./pid')("myapp"); | |
// | |
var fs = require('fs'); | |
module.exports = function(appname){ | |
process.title = appname; | |
var PID_FILE = "/usr/local/var/run/"+process.title+".pid"; |
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
# paas | |
## 基本概念 | |
* paas:platform as a service 把服务器平台作为一种服务提供的商业模式。涵盖开发,测试,在线部署等方面 | |
* 多租户:从多用户的概念基础上发展而来,不同于传统的多用户共享一个相同的实例,在权限上区分用户的使用范围。面向应用实例,而非虚拟化技术面向操作系统,在设计时就必须实现自身数据和配置信息的虚拟分区。一般来说有以下三种模型: | |
* 私有表:每个租户建立单独的表 | |
* 扩展表:分基本表和共享表 | |
* 通用表:通用表包括租户位和数据位 | |
## 应用场景 | |
## 相关材料 |
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
require 'formula' | |
class Nginx < Formula | |
homepage 'http://nginx.org/' | |
url 'http://nginx.org/download/nginx-1.2.1.tar.gz' | |
sha1 '4fb69411f6c3ebb5818005955a085e891e77b2d8' | |
devel do | |
url 'http://nginx.org/download/nginx-1.3.2.tar.gz' | |
sha1 'a3507cb2f13332489804f79885541c717f8f4bf0' |
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
bower cloning git://github.com/chaijs/chai.git | |
bower fetching chai | |
bower cached git://github.com/chaijs/chai.git | |
bower checking out chai#1.7.0 | |
bower copying /Users/wenbing/.bower/cache/chai/7333909bbdb6ee7aaa74fd94a5175994 | |
bower cloning git://github.com/chaijs/assertion-error.git | |
bower cached git://github.com/chaijs/assertion-error.git | |
bower fetching chaijs/assertion-error | |
bower checking out chaijs/assertion-error#1.0.0 | |
bower copying /Users/wenbing/.bower/cache/chaijs/assertion-error/0f009875201e9aa47aea017f624de118 |
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
var Y = require('yui').YUI({ useSync: true, debug: true, filter: 'debug' }); | |
Y.use('base'); | |
Y.Base.thisis = 'a'; | |
// print 'a' | |
Y.log(Y.Base.thisis); | |
/** | |
* set force=true with applyConfig |
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
var express = require('express'); | |
var app = express(); | |
app.set('env', 'production'); | |
app.get('/', function(req, res) { | |
throw new Error('dsjldsl'); | |
}); |
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
var Y = require('yui').YUI({useSync: true, filter: 'debug' }); | |
Y.use('event-custom', 'oop'); | |
function A(parent) { | |
if(parent) { | |
this.parent = parent; | |
this.addTarget(parent); | |
} | |
} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
// ... | |
}); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
}; |
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
<#function bodyClass> | |
<#local | |
uri = page.request.getRequestURI(), | |
uri = uri?replace("/", "", "f"), | |
parts = uri?split("/"), | |
classes = "page" | |
/> | |
<#if uri == "/"> | |
<#local classes = classes + " page-index" /> | |
</#if> |