Skip to content

Instantly share code, notes, and snippets.

View nickserv's full-sized avatar

Nicky McCurdy nickserv

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@nickserv
nickserv / CODE_OF_CONDUCT.md
Last active February 3, 2025 20:44
Tenets of The Satanic Temple

Tenets of The Satanic Temple

  1. One should strive to act with compassion and empathy toward all creatures in accordance with reason.
  2. The struggle for justice is an ongoing and necessary pursuit that should prevail over laws and institutions.
  3. One's body is inviolable, subject to one's own will alone.
  4. The freedoms of others should be respected, including the freedom to offend. To willfully and unjustly encroach upon the freedoms of another is to forgo one's own.
  5. Beliefs should conform to one's best scientific understanding of the world. One should take care never to distort scientific facts to fit one's beliefs.
  6. People are fallible. If one makes a mistake, one should do one's best to rectify it and resolve any harm that might have been caused.
  7. Every tenet is a guiding principle designed to inspire nobility in action and thought. The spirit of compassion, wisdom, and justice should always prevail over the written or spoken word.
@nickserv
nickserv / .prettierignore
Last active January 17, 2025 00:47
Ignore lockfiles (which are already formatted by package managers) in Prettier to reduce churn
# JavaScript
**/bun.lock
**/package-lock.json
**/pnpm-lock.yaml
**/yarn.lock
# Ruby
**/Gemfile.lock
@nickserv
nickserv / App.jsx
Last active January 10, 2024 15:27
React script using module expression https://github.com/tc39/proposal-module-expressions
export default function App() {
return (
<>
<script>
{
module {
import analytics from "..."; // Import an analytics library, possibly from a CDN
// Configure analytics library
}
}
@nickserv
nickserv / actions.tsx
Last active July 21, 2023 06:45
RSC render JSX using server action from client component
"use server";
export async function hello() {
return <h1>Hello, world!</h1>;
}
@nickserv
nickserv / page.tsx
Last active December 31, 2023 14:59
RSC streaming using recursive promises https://twitter.com/shuding_/status/1681373460860108810
async function Row({ chunk }) {
const { next, value, done } = await chunk
if (done) return null
return (
<>
{value}
<Row chunk={next} />
</>
)
}
@nickserv
nickserv / README.md
Last active July 22, 2023 06:10
Browserslist config Baseline

Browserslist config Baseline

To consistently use Baseline browsers (Chrome, Edge, Firefox, Safari) with your web toolchain, add these to your Browserslist:

"browserslist": [
  "last 2 chrome versions",
  "last 2 edge versions",
  "last 2 firefox versions",
 "last 2 safari major versions"
@nickserv
nickserv / ts-node.diff
Created May 9, 2023 06:23
Quick fix to use ts-node with Node 20
- ts-node --esm [path]
+ node --loader ts-node/esm [path]
@nickserv
nickserv / parser.ts
Created December 28, 2022 02:39
Generic TypeScript parser type (similar to JSON)
interface Parser<T> {
parse(text: string): T
stringify(value: T): string
}
@nickserv
nickserv / README.md
Last active November 10, 2022 23:05
Hide Twitter Verified

Installation

  1. Install uBlock Origin
  2. Place a checkmark next to Import under the Custom section near the bottom of the Filter lists pane
  3. Paste the following URL into the text area that appears below
https://gist.githubusercontent.com/nickmccurdy/177e52afe1d5b4647e6b72705f5a652c/raw/no-verified.txt