Skip to content

Instantly share code, notes, and snippets.

@hl4
hl4 / dabblet.css
Created June 3, 2022 01:59 — forked from csssecrets/dabblet.css
Vertical stripes
/**
* Vertical stripes
*/
background: linear-gradient(45deg,
#fb3 25%, #58a 0,
#58a 50%, #fb3 0,
#fb3 75%, #58a 0);
background-size: 60px 60px;
@hl4
hl4 / main.js
Created July 15, 2018 13:18
前缀序号生成算法
/**
* { id:标识符,
* pid: 父结点标识符
* prefix: 前缀, pid=0时前缀固定
* createTime: 创建或个性时间,当父节点相同时,时间小的排前面
* parent:通过initParent后计算出指向父节点对象(id==this.pid)
* }
*/
/** 生成父节点
@hl4
hl4 / 21st.md
Last active February 4, 2018 08:03
21点游戏设计

写程序之前,先考虑数据结构:

怎么表示一张牌?

花色(4种)+牌面(1-13),我们暂定义为card。

怎么表示一套牌?

52张花色和牌面都不重复的牌,可以定义一个card数组,长度为52。

怎么表示一手牌?

@hl4
hl4 / 51-android.rules
Created February 23, 2016 10:02 — forked from johnmurrayvi/51-android.rules
Udev permission for android devices
## Acer
#SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0600", OWNER="<username>"
## ASUS
#SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0600", OWNER="<username>"
## Dell
#SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0600", OWNER="<username>"
## Foxconn