Skip to content

Instantly share code, notes, and snippets.

View lazyTai's full-sized avatar

刘明泰 lazyTai

View GitHub Profile
const cc=console;
var a=require('yargs').argv;
if(a.params=="liumingtai"){
cc.log("真确");
}else{
}
@lazyTai
lazyTai / decorators@@@@
Last active September 27, 2017 12:04
es6
npm install --save-dev babel-plugin-transform-decorators
{
"plugins": ["transform-decorators"]
}
@lazyTai
lazyTai / sublime eclise +emmet tab
Created September 26, 2017 03:38
sublime eclise +emmet tab
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@lazyTai
lazyTai / sublime plugin
Created September 26, 2017 05:57
sublime plugin
Package Control Messages
========================
SublimeCodeIntel
----------------
SublimeCodeIntel
================
____ _ _ _ ____ _ ___ _ _
@lazyTai
lazyTai / chai
Last active September 27, 2017 03:40
karam test
/*actually i dont want to leanr the shit chai 没办法*/
import chai from 'chai'
@lazyTai
lazyTai / rebound.jsx
Created September 28, 2017 11:51
reboundjs
import React from 'react'
import rebound from 'rebound'
var springSystem = new rebound.SpringSystem();
var spring = springSystem.createSpring(50, 3);/* 50---3 */
function setSpring(el) {
SpringConfig
.fromOrigamiTensionAndFriction
```
fromOrigamiTensionAndFriction: function(tension, friction) {
return new SpringConfig(
OrigamiValueConverter.tensionFromOrigamiValue(tension),
OrigamiValueConverter.frictionFromOrigamiValue(friction));
},
@lazyTai
lazyTai / react trasition
Last active October 1, 2017 03:07
react trasition
import React from 'react'
import ReactDOM, { findDOMNode } from 'react-dom'
// import addClass from 'dom-helpers/class/addClass';
import { addClass } from 'dom-helpers/class';
import raf from 'dom-helpers/util/requestAnimationFrame';
import { querySelectorAll } from 'dom-helpers/query';
const timeout = 400
export class Group extends React.Component {
constructor(props) {
/*
* Tween.js
* t: current time(当前时间);
* b: beginning value(初始值);
* c: change in value(变化量);
* d: duration(持续时间)。
* you can visit 'http://easings.net/zh-cn' to get effect
*/
var Tween = {
Linear: function (t, b, c, d) { return c * t / d + b; },