Skip to content

Instantly share code, notes, and snippets.

View bbb0ttle's full-sized avatar
🍼

bbbottle bbb0ttle

🍼
View GitHub Profile
A placeholder aims to pin nothing.
@bbb0ttle
bbb0ttle / TEST.md
Created November 26, 2019 09:31
PLACEHOLDER
HELLO WORLD
记一:负什么气?
> 就你根本就不想着我
~~记二:出走到了哪?~~
~~成谜~~
记三:回家了吗?
沙发上躺着呢
@bbb0ttle
bbb0ttle / data2bar.js
Created July 30, 2019 01:52
时间转柱状图
data = `D1 02:17.38
D2 03:31.80
D3 02:34.90
D4 00:00.00
D5 02:59.96
D6 03:16.69
D7 06:42.06
D8 08:30.52
D9 04:20.41`
@bbb0ttle
bbb0ttle / addCssRule.js
Last active January 25, 2018 04:30
JS添加 css 规则
// 1. styleSheets
// The Document.styleSheets read-only property returns a StyleSheetList
// of CSSStyleSheet objects for stylesheets explicitly linked into or embedded in a document.
// 2. CSSStyleSheet objects
// 2.1. properties
// 2.1.1. cssRules
// 2.1.2. ownerRule
// 2.2. methods
// 2.2.1 deleteRule
@bbb0ttle
bbb0ttle / getOpt.js
Last active January 20, 2018 05:21
命令行短参数解析
// 命令行短参数解析。
// 移植于 <a href="https://github.com/python/cpython/blob/2.7/Lib/getopt.py">https://github.com/python/cpython/blob/2.7/Lib/getopt.py</a>
function getOpt(shortopts, argsArr){
let opts = {};
while(argsArr.length > 0 && argsArr[0].startsWith('-') && argsArr[0] != '-') {
if(argsArr[0] == '--' ) {
argsArr = argsArr.slice(1);
break;
}
if(argsArr[0].startsWith('--')){