Skip to content

Instantly share code, notes, and snippets.


Jianfeng Liu fengliu222

View GitHub Profile
View html
<!doctype html>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
/* -------------------------------------
------------------------------------- */
View project.js
const mockProjectTrend = R.reverse()(R.repeat(1, 200).map((key, index) => ({
dateTime: moment().subtract(index, 'days').format('YYYY-MM-DD'), //时间
price: {
CNY: 1.239928076 * index,
USD: 0.195644770 * index,
BTC: 0.000023000 * index,
ETH: 0.000274619 * index,
EOS: 0.014086445 * index
}, // 投资回报率
vol: {
View gist:9143eb56bba1f585437ca5c271b5a93f
const mockTrend = R.repeat(1, 200).map((key, index) => ({
dateTime: moment().subtract(index, 'days').format('YYYY-MM-DD'), //时间
ROI: index * 10, // 投资回报率
profits: index * Math.random() * 1000, // 浮动盈亏
assets: index * Math.random() * 10000 // 总资产
// 代码中会兼容本地 service mock 以及部署站点的静态数据
const proxy = {
'/mock/dashboard': (req, res) => {
View gist:37155ff3f8e414424961994376f5726d
* 走势图彩种结构
const lottery = {
fields: [
key: 'number',
name: '期号',
fengliu222 /
Last active Aug 29, 2015 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
fengliu222 / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
fengliu222 / repeat.js
Created Feb 17, 2014
View repeat.js
String.prototype.repeat = function(count){
return new Array( count+1 ).join(this);
fengliu222 / index.html
Created Nov 15, 2012
A CodePen by fengliu222.
View index.html
<div id="main">
<div id="slide">
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
<li><img src="'" alt=""></li>
View index.html
<div class="scroll">
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
<li><img src="" alt="1"></li>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>