Skip to content

Instantly share code, notes, and snippets.

View shlroland's full-sized avatar
🎯
Focusing

Roland shlroland

🎯
Focusing
  • Nutstore
  • shanghai
  • 17:57 (UTC +08:00)
View GitHub Profile
@BrianHung
BrianHung / Highlight.tsx
Created July 4, 2024 00:14
CodeMirror 6 RunMode
// Copy of https://github.com/craftzdog/react-codemirror-runmode
// with support for custom languages
import React from "react";
import { Parser } from "@lezer/common";
import { Highlighter } from "@lezer/highlight";
import { StyleModule } from "style-mod";
import highlight from "./highlight";
@FirokOtaku
FirokOtaku / main.js
Last active January 31, 2024 11:02
请粘贴到浏览器控制台食用
[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(!
@WhiteMinds
WhiteMinds / index.md
Last active January 4, 2025 17:39
我的开发哲学与实践整理

写在前面

  1. 本文的有一些哲学是摘自互联网中他人所撰写的,还有一些是与同行探讨获得的建议,其中一部分建议来自 bolasblack
  2. 本文主要针对多人协作开发的大型项目的场景,并且是基于 Magickbase 的一些项目进行的思考
  3. 本文默认读者是具备一定英文读写能力和开发能力的开发者
  4. 不要只是去背下这些规则,而是要尝试理解它们的意图(解决什么问题)和手段(怎么解决)

开发哲学(理念)

  1. 思想很重要,思想会指导你如何开发、遇到问题时做出怎样的选择(做决策)
@nsdont
nsdont / crontab
Last active March 15, 2023 12:14
Rime macOS 同步脚本 & 定时执行
0 6 * * * "/Users/apple/Library/Rime/sync.sh" >> /tmp/rime_sync-"$(date +"%Y%m")".log 2>&1 &
@hsablonniere
hsablonniere / README.md
Created May 2, 2012 22:42
scrollIntoViewIfNeeded 4 everyone!!!

scrollIntoViewIfNeeded 4 everyone!!!

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.

Usage

Just use the code in index.js in your app or website. You can see usage in the test page test.html.

The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.