Skip to content

Instantly share code, notes, and snippets.

View techird's full-sized avatar

techirdliu techird

View GitHub Profile
@techird
techird / tableSortable.ts
Last active May 22, 2018 13:24
表格拖动排序交互
/**
* 拖动上下文,贯穿拖动排序的整个生命周期
*/
export interface DraggingContext {
startPosition: [number, number];
activated: boolean;
source: HTMLTableRowElement;
sourceIndex: number;
sourceHeight: number;
@techird
techird / gist:54888fde59d90f87394c339449a452db
Created November 9, 2017 06:50 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
git clone https://github.com/fex-team/kityminder-core
cd kityminder-core
npm install
bower install
git submodule init
git submodule update
cd lib/kity
npm install
npm install -g grunt-cli
grunt
@techird
techird / promise.js
Created January 27, 2015 04:55
svg loader
define(function(require, exports, module) {
/*!
** Thenable -- Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
** Copyright (c) 2013-2014 Ralf S. Engelschall <http://engelschall.com>
** Licensed under The MIT License <http://opensource.org/licenses/MIT>
** Source-Code distributed on <http://github.com/rse/thenable>
*/
/* promise states [Promises/A+ 2.1] */
var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */
@techird
techird / a.svg
Last active August 29, 2015 14:13
Use shape with clipPath
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
bash -c "$(curl -s https://gist.githubusercontent.com/techird/f301476006209e039630/raw)"
mkdir -p ./.git/hooks/ && curl -s https://gist.githubusercontent.com/techird/0104a1dd01c2d19919c5/raw > ./.git/hooks/pre-commit && chmod +x ./.git/hooks/pre-commit && echo 'Install Success!'
@techird
techird / jscheck
Last active August 29, 2015 14:09
#!/bin/sh
# @Author: techird
# @Date: 2014/11/19 11:10
# @Last Modified by: techird
# @Last Modified time: 2014/11/19 11:10
#git diff --cached --name-only --diff-filter=ACMR
files=$(git diff --cached --name-only --diff-filter=ACMR | grep "\.js$")
if [ "$files" = "" ]; then
exit 0
@techird
techird / test.md
Created November 3, 2014 06:07
test image upload

d

.triangle {
content: ' ';
display: block;
width: 0;
height: 0;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
}