Instantly share code, notes, and snippets.
Discover gists
yovko /arch_linux_install_notes.md
Last activeDecember 18, 2025 10:34
Arch Linux installation (BTRFS+LUKS2+Limine)paulirish /what-forces-layout.md
Last activeDecember 18, 2025 10:31
What forces layout/reflow. The comprehensive list.All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow orlayout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| importrequests | |
| importtime | |
| importre | |
| importos | |
| # 从环境变量中获取 Cookie | |
| COOKIES=os.environ.get('BAIDU_COOKIE','') | |
| HEADERS= { | |
| 'Connection':'keep-alive', |
qoomon /conventional-commits-cheatsheet.md
Last activeDecember 18, 2025 10:25
Conventional Commits Cheatsheet This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| port:7890 | |
| socks-port:7891 | |
| redir-port:7892 | |
| allow-lan:true | |
| mode:Rule | |
| log-level:info | |
| external-controller:0.0.0.0:9090 | |
| secret:"xxxxxx" | |
| dns: | |
| enable:true |
rxaviers /gist:7360908
Last activeDecember 18, 2025 10:21
Complete list of github markdown emoji markup This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| #defineSWAP(a,b) if (arr[a] > arr[b]) { uint8_t tmp = arr[a]; arr[a] = arr[b]; arr[b] = tmp; } | |
| // Sorting network for 9 elements (25 steps) | |
| voidSortingNetwork9(uint8_t*arr) { | |
| SWAP(0,1); | |
| SWAP(3,4); | |
| SWAP(6,7); | |
| SWAP(1,2); | |
| SWAP(4,5); | |
| SWAP(7,8); |
Mark-Marks /loader.luau
CreatedDecember 18, 2025 09:56
Roblox module loader with topological sorting via dependency resolution This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| typeArray<T>= {T } | |
| typeMap<K,V>= { [K]:V } | |
| typeGraph<T>=Map<T,Array<T>> | |
| -- Based on Kahn's algorithm | |
| localfunctiontoposort<T>(graph:Graph<T>):Array<T> | |
| localin_degree:Map<T,number>= {} | |
| fornode,neighborsingraphdo | |
| in_degree[node]=0 | |
| for_,neighborinneighborsdo |
NewerOlder