Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jianfeng Liu fengliu222

🎯
Focusing
View GitHub Profile
View html
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>非常感谢您对Hotnode产品的关注与支持。</title>
<style>
/* -------------------------------------
GLOBAL RESETS
------------------------------------- */
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) => {
res.send({
View gist:37155ff3f8e414424961994376f5726d
/**
* 走势图彩种结构
*/
const lottery = {
fields: [
{
key: 'number',
name: '期号',
},
@fengliu222
fengliu222 / javascript_resources.md
Last active Aug 29, 2015 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • 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
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
fengliu222 / repeat.js
Created Feb 17, 2014
string.prototype.repeat
View repeat.js
String.prototype.repeat = function(count){
return new Array( count+1 ).join(this);
}
@fengliu222
fengliu222 / index.html
Created Nov 15, 2012
A CodePen by fengliu222.
View index.html
<div id="main">
<div id="slide">
<ul>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
<li><img src="http://pic.yupoo.com/zhenghong/CpEvg2Fi/small.jpg'" alt=""></li>
View index.html
<center>
<div class="scroll">
<ul>
<li><img src="http://imgsrc.baidu.com/forum/pic/item/ba19c833c895d14316c4f9ad73f0820258af07c8.jpg" alt=""></li>
<li><img src="http://imgsrc.baidu.com/forum/pic/item/ba19c833c895d14316c4f9ad73f0820258af07c8.jpg" alt=""></li>
<li><img src="http://imgsrc.baidu.com/forum/pic/item/ba19c833c895d14316c4f9ad73f0820258af07c8.jpg" alt="1"></li>
<li><img src="http://imgsrc.baidu.com/forum/pic/item/ba19c833c895d14316c4f9ad73f0820258af07c8.jpg" alt=""></li>
<li><img src="http://imgsrc.baidu.com/forum/pic/item/ba19c833c895d14316c4f9ad73f0820258af07c8.jpg" alt=""></li>
</ul>