Skip to content

Instantly share code, notes, and snippets.

View ijse's full-sized avatar
🎯
Focusing

Li Yi ijse

🎯
Focusing
View GitHub Profile
@ijse
ijse / github-api-merge-branch.sh
Created October 15, 2016 10:33
call github api to merge branches
#!/bin/bash
# Merge Github branch
#
# Usage:
# shells/merge-branch.sh <base-branch> <head-branch> [commit message]
request=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )/request.sh
# The name of the base branch that the head will be merged into.
@ijse
ijse / tooltip.less
Created December 5, 2016 03:07
Pure CSS Tooltips
[tooltip],
[tooltip-top],
[tooltip-right],
[tooltip-left],
[tooltip-bottom] {
@bgcolor: #495364;
position: relative;
cursor: pointer;
&:before,
&:after {
@ijse
ijse / findata.json
Last active May 15, 2017 08:13
tiger findata
{
"ret": 0,
"items": [
{
"market": "US",
"sectors": [
{
"name": "工业产品",
"industries": [
{
@ijse
ijse / EventBus.js
Created May 22, 2017 08:33
Simple and no-deps EventEmitter implement for Browser
export default class EventBus {
constructor () {
this.bus = document.createElement('span')
}
on (eventName, fn) {
const handler = event => {
fn && fn(...event.params)
}
this.bus.addEventListener(eventName, handler)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@ijse
ijse / ActiveTracker.ts
Created June 1, 2025 13:54
用户页面活跃状态跟踪
/* eslint-disable no-console */
interface ActiveTrackerConfigs {
/**
* 活跃事件名称列表
*/
watchEvents: string[];
/**
* 不活跃阈值(ms)