Skip to content

Instantly share code, notes, and snippets.

Lxx Tomyail

Block or report user

Report or block Tomyail

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Tomyail
Tomyail / dynamic-add-reducer-in-redux.js
Created Sep 15, 2017
dynamic add reducer in redux
View dynamic-add-reducer-in-redux.js
/**
* Created by lixuexin on 2017/9/15.
*/
import { createStore, combineReducers } from 'redux';
import _ from 'lodash';
const reducer = combineReducers({
dynamicRoot: (state = {}, action) => {
// if your want to change all reducer,see
@Tomyail
Tomyail / redmine2omnifocus.js
Last active Aug 1, 2017
get the selected title and href from redmine and add them to omnifucus
View redmine2omnifocus.js
/**
* Created by lixuexin on 2017/8/1.
*/
// how to use
// 1: selected the items you want to add to omnifocus ( press command for multi select )
// 2: open chrome(>59) console and paste the follow code
var count = 0;
Array.prototype.forEach.call(
document.getElementsByClassName('context-menu-selection'),
item => {
@Tomyail
Tomyail / curry test.js
Created Jun 6, 2017
curry test created by Tomyail - https://repl.it/I7cW/0
View curry test.js
var R = require('ramda');
var add = (b,str)=>str.split(b);
const curryAdd = R.curry(add);
curryAdd(" ")("2 1")
View GamblingCircle.as
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;
import flash.utils.getTimer;
class GamblingCircle
{
private var path:Vector.<Point>;
private var items:Vector.<DisplayObject>;
View CircularCoverFlow.as
package
{
import com.greensock.TweenLite;
import com.greensock.easing.Quad;
import com.greensock.easing.Quart;
import com.greensock.easing.Quint;
import flash.display.Sprite;
import flash.events.MouseEvent;
public class CircularCoverFlow extends Sprite
@Tomyail
Tomyail / getLegalIndexFromArray.as
Created Jan 10, 2013
(i%3+3)%3 i是任意整型,3是数组长度,得到的结果都是一个对于该数组合法的索引
View getLegalIndexFromArray.as
public function getLegalIndexFromArray(index,arrayLength):int
{
return (index%arrayLength+arrayLength)%arrayLength;
}
View FunctionUtils.as
package utils
{
import flash.system.System;
import flash.utils.describeType;
public class FunctionUtils
{
/**
* 不适合构造函数
* @param target
@Tomyail
Tomyail / Clock.as
Created Mar 20, 2012
"万能"计时器
View Clock.as
package
{
import flash.events.TimerEvent;
import flash.utils.Timer;
/**
* 计时器
* @author lixuexin
*
*/
public class Clock
@Tomyail
Tomyail / FishRoundFly.as
Created Dec 9, 2011
坐标旋转版圆周运动(包含坐标误差版本和正确版本)
View FishRoundFly.as
package demo
{
import flash.display.Sprite;
import flash.events.*;
import flash.geom.Matrix;
import flash.geom.Point;
public class FishRoundFly extends Sprite
{
private var fish:Sprite = new Sprite;
@Tomyail
Tomyail / Matrix3DTest.as
Created Dec 1, 2011
以可视化的方式表现矩阵变幻
View Matrix3DTest.as
package
{
import com.bit101.components.InputText;
import com.bit101.components.PushButton;
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.MouseEvent;
import flash.geom.Matrix3D;
You can’t perform that action at this time.