Skip to content

Instantly share code, notes, and snippets.

View leeight's full-sized avatar
💭
I may be slow to respond.

Li YuBei leeight

💭
I may be slow to respond.
View GitHub Profile
@leeight
leeight / rAF.js
Created October 12, 2012 04:19 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
/* Copyright (c) 2008-2013 Luminate, Inc. All Rights Reserved */
/*
* jQuery JavaScript Library v1.8.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
....
....
function G(M) {
if ($lmn8 && $lmn8.container && c.length) {
var N = $lmn8.container.offset();
if (parseInt(N.left, 10) !== 0 || parseInt(N.top, 10) !== 0) {
$lmn8.container.css("position", "absolute").offset({
top: 0,
left: 0
})
@leeight
leeight / ChkFlags.java
Last active December 27, 2015 07:19
Using closure-compiler to parse js file and extract the desired docs.
package com.baidu.lego.server.utils;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import com.google.gson.JsonPrimitive;
import com.google.javascript.jscomp.Compiler;
import com.google.javascript.jscomp.CompilerOptions;
diff --git a/edp-build-config.js b/edp-build-config.js
index 54f6224..350d877 100644
--- a/edp-build-config.js
+++ b/edp-build-config.js
@@ -12,7 +12,19 @@ exports.getProcessors = function () {
new CssCompressor(),
- new JsCompressor()
+ new JsCompressor(),
@leeight
leeight / php.handler.js
Created March 4, 2014 08:38
edp-webserver-php-handler
/***************************************************************************
*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* $Id$
*
**************************************************************************/
/**
@leeight
leeight / edp-1.0.0.patch
Last active August 29, 2015 13:57
app/ecom/baike/trunk/web/src/main/webapp
diff --git a/edp-build-config.js b/edp-build-config.js
index 0078580..9b345fb 100644
--- a/edp-build-config.js
+++ b/edp-build-config.js
@@ -3,59 +3,70 @@ exports.input = __dirname;
var path = require( 'path' );
exports.output = path.resolve( __dirname, 'output' );
-var moduleEntries = 'html,htm,phtml,tpl,vm,js';
-var pageEntries = 'html,htm,phtml,tpl,vm';
@leeight
leeight / edp-1.0.0.patch
Last active August 29, 2015 13:57
app/ecom/brandlandscape/trunk/brand_landscape/bl-fe/src/main/webapp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..53752db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+output
diff --git a/edp-build-config.js b/edp-build-config.js
index e0c8faa..a3a29a8 100644
--- a/edp-build-config.js
@leeight
leeight / edp-1.0.0.patch
Last active August 29, 2015 13:57
app/ecom/nmplt/trunk/muses-web/src/main/webapp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..53752db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+output
diff --git a/edp-build-config.js b/edp-build-config.js
index 9f017bf..c12c9e9 100644
--- a/edp-build-config.js
@leeight
leeight / edp-1.0.0.patch
Last active August 29, 2015 13:57
app/ecom/fe/trunk/vs/bs-edu
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..53752db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+output
diff --git a/edp-build-config.js b/edp-build-config.js
index e936926..6d3466c 100644
--- a/edp-build-config.js