Skip to content

Instantly share code, notes, and snippets.

View lazyTai's full-sized avatar

刘明泰 lazyTai

View GitHub Profile
@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) {
@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 / sublime plugin
Created September 26, 2017 05:57
sublime plugin
Package Control Messages
========================
SublimeCodeIntel
----------------
SublimeCodeIntel
================
____ _ _ _ ____ _ ___ _ _
@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 / decorators@@@@
Last active September 27, 2017 12:04
es6
npm install --save-dev babel-plugin-transform-decorators
{
"plugins": ["transform-decorators"]
}
const cc=console;
var a=require('yargs').argv;
if(a.params=="liumingtai"){
cc.log("真确");
}else{
}
@lazyTai
lazyTai / mytest1.js
Created September 25, 2017 02:52
mouse move the circle springmove
/*
*
刘明泰
mail:1352983234@qq.com
github:lazyTai
*/
import React from 'react';
import {Motion, spring} from 'react-motion';
import './css.css'
@lazyTai
lazyTai / index.html
Created September 24, 2017 02:16
requestAnimationFrame demo
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>requestAnimationFrame</title>
</head>
<body>
<style>
@lazyTai
lazyTai / animatioonDemo.js
Created September 24, 2017 01:50
demo requestAnimationFrame
// 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
// MIT license
(function () {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];