Skip to content

Instantly share code, notes, and snippets.

View LeoHuiyi's full-sized avatar
🎯
Focusing

leo LeoHuiyi

🎯
Focusing
View GitHub Profile
@LeoHuiyi
LeoHuiyi / gitstars.json
Created February 5, 2018 04:42
github stars manager for production
{"tags":[],"lastModified":1517805709963}
import React, {Component} from 'react';
import {bindActionCreators} from "redux"
import { connect } from 'react-redux';
import {schema, getModelByType} from "models/models"
import SomeFormComponent from "SomeFormComponent"
import {selectedItemSelector, isEditingSelector} from "selectors/entities"
let mapStateToProps = (state) => {
@LeoHuiyi
LeoHuiyi / dom-helper.js
Created July 14, 2017 07:20 — forked from m3g4p0p/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@LeoHuiyi
LeoHuiyi / flex
Created May 21, 2016 10:45 — forked from kmokidd/flex
Adapt android 2.1+ WebView, thanks https://github.com/stevenbenisek/compass-flexbox
/* display:flex; */
.flex { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; }
/* row reverse */
.flex.flex--reverse { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: row-reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
/* column */
.flex--clo { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: normal; -moz-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; }
/* column reverse*/
.flex--col.flex--reverse { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
/* 子元素之间间距 */
.flex--justify-content--space-between { -webkit-box-pack: justify; -moz-box-pack: justify; -ms-flex-pack: justify
@LeoHuiyi
LeoHuiyi / demo.js
Created April 12, 2016 10:54 — forked from kevinma2010/demo.js
基于 jQuery Ajax 定制自己喜爱的 API
//附加公共参数
$http.global("token","abcd321");
$http.use("/api", function (res) {
if (res.success) {
return true;
}
var err = res.error;
if (err.code === 1001) {
location.href = "/login.html";
} else {
@LeoHuiyi
LeoHuiyi / path.js
Last active August 29, 2015 14:06 — forked from shepherdwind/path.js
"use strict";
/**
* 11 12 13 14 15
* 21 22 23 24 25
* 31 32 33 34 56
* 41 42 43 44 45
* 51 52 53 54 55
*/
//var maps = [];
var log = console && console.log;