Skip to content

Instantly share code, notes, and snippets.

View LeoEatle's full-sized avatar
🌚
functional rendering is so good

LeoEatle LeoEatle

🌚
functional rendering is so good
View GitHub Profile
@LeoEatle
LeoEatle / gulp.fork.js
Created April 26, 2020 13:50
Gulp forking a stream (e.g. send different files to different dests)
gulp.task("ts", function() {
// These would be the names of two source files for example
tsRootFiles = ["rab", "buildRab"];
tsRootFiles.forEach(tsFile => {
let stream = gulp
.src(`ts/${tsFile}.ts`)
.pipe(sourcemaps.init())
.pipe(
ts({
@LeoEatle
LeoEatle / videohandler.js
Created September 17, 2019 09:56
screenshot from video
/**
* 处理视频文件,获取封面图和时长
* @author leoeatle
*/
define(function(require, exports, module) {
var userAgent = window.navigator.userAgent;
var isSafari = userAgent.indexOf('Safari') != -1 && userAgent.indexOf('Chrome') == -1;
function getVideoInfo(file, element, callback) {
var duration;
@LeoEatle
LeoEatle / videohandler.js
Created September 17, 2019 09:56
screenshot from video
/**
* 处理视频文件,获取封面图和时长
* @author leoeatle
*/
define(function(require, exports, module) {
var userAgent = window.navigator.userAgent;
var isSafari = userAgent.indexOf('Safari') != -1 && userAgent.indexOf('Chrome') == -1;
function getVideoInfo(file, element, callback) {
var duration;
@LeoEatle
LeoEatle / 3d-text-effect-mousemove.markdown
Created August 8, 2016 11:32
3d Text effect - mousemove
@LeoEatle
LeoEatle / thislife_.idea_misc.xml
Created August 8, 2016 02:35
Including a flask website and the exercise for Liao
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.10 (/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7)" project-jdk-type="Python SDK" />
</project>