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
html(ng-app="app") | |
head | |
title demo | |
body | |
#wrap(ng-controller="myCtrl") | |
h1 我是 {{me.name}} , 我已经 {{me.age}} 岁了 |
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 maps = { | |
'weibo': 'fa-weibo' | |
} | |
var parse = function(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
return a; | |
} |
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 Depender = require('depender'); | |
dep = new Depender; | |
dep.define('text', '123'); | |
dep.define('text2', 'demo222222'); | |
dep.define('functionOne', function(msg) { | |
console.log(msg); | |
}); | |
dep.use(function(text2, text, functionOne, nonce) { |
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 server = require('express-scaffold'); | |
// init a new server running on default port 3000 | |
new server({ | |
name: "just another express app", | |
desc: "some desciption here", | |
database: { | |
name: "expressdemo" | |
} | |
}) |
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 ($) { | |
var rules = document.styleSheets[document.styleSheets.length-1].cssRules; | |
for (var idx = 0, len = rules.length; idx < len; idx++) { | |
$(rules[idx].selectorText).each(function (i, elem) { | |
elem.style.cssText += rules[idx].style.cssText; | |
}); | |
} | |
$('style').remove(); | |
$('script').remove(); | |
})(jQuery); |
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 sdk = require('sdk'); | |
// init a API | |
var demo = new sdk({ | |
read: { | |
url: '/demo/read/{{name}}', | |
method: 'get' | |
}, | |
update: { | |
url: '/demo/update', |
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
#include "include.h" | |
/* | |
{ | |
"method":"helloworld.onoff", | |
"params":"on"/"off" | |
} | |
*/ |
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 Book = function(name) { | |
this.name = name; | |
this.demo = '123'; | |
} | |
var Method = function() { | |
// 继承了 Book 的静态属性 this.demo = '123' | |
Book.apply(this, arguments); | |
} |
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
<!-- 引入menkr cdn 提供的seajs源 和 配置文件 --> | |
<script src="http://cdn.menkr.com/sea.js" data-config="config/config.js" charset="utf-8"></script> | |
<script> | |
// 使用别名(alias)加载组件 | |
seajs.use(['jquery', 'moment'], function($, moment) { | |
$(document).ready(function() { | |
console.log('Menkr CDN 上线时间距离现在:') | |
console.log(moment("20130329", "YYYYMMDD").fromNow()) | |
}); | |
}); |
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
### Keybase proof | |
I hereby claim: | |
* I am guo-yu on github. | |
* I am turing (https://keybase.io/turing) on keybase. | |
* I have a public key whose fingerprint is 8E29 8B80 4274 5B10 232F 174F 5B12 3599 1CF7 7ABC | |
To claim this, I am signing this object: |
NewerOlder