Skip to content

Instantly share code, notes, and snippets.

View way2ex's full-sized avatar
😁
Working

Justin Zhu way2ex

😁
Working
View GitHub Profile
@way2ex
way2ex / index.html
Created November 11, 2022 07:47 — forked from mcxiaoke/index.html
detect app installed in browser
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!-- iframe used for attempting to load a custom protocol -->
<iframe style="display:none" height="0" width="0" id="loader"></iframe>
@way2ex
way2ex / batch.sh
Created November 5, 2020 03:31
Run yarn command for multiple workspaces
# 调用方式
# sh batch.sh admin,audit,video add package -D
echo $@
# 拆分参数
allParams=($@)
command=${allParams[@]:1}
workspacesString=$1
echo $command
@way2ex
way2ex / grid-matrix.js
Last active October 27, 2020 07:26
Creating grid layout config by list items with width and height
const CELL_STATE = {
EMPTY: 0,
EMPTY_LINE: 'o',
UNUSABLE: 'u',
};
import { TYPES } from './const';
function isEmpty(state) {
return [ CELL_STATE.EMPTY, CELL_STATE.EMPTY_LINE ].includes(state);
}
// function isEmptyLine(state) {