Skip to content

Instantly share code, notes, and snippets.

View nickserv's full-sized avatar

Nicky McCurdy nickserv

View GitHub Profile
@t3dotgg
t3dotgg / model-prices.csv
Last active April 1, 2025 13:10
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
DeepSeek v3 $0.27 $1.10
DeepSeek r1 $0.55 $2.19
ChatGPT o3-mini $1.10 $4.40
ChatGPT 4o $2.50 $10.00
@LizAinslie
LizAinslie / README.md
Last active December 19, 2024 18:38
A beautiful discord/vencord dev build setup fish function script I wrote for my Arch install.

update_discord.fish

A cheerful & colorful Fish function I wrote to keep my Discord and Vencord installations up to date on my Arch machine.

update_discord help text

This function assumes that you have the following installed:

  • git
  • node
  • pnpm
  • wget
// Define a trait function to that expects behavior to convert a value to type T
trait fun to<T>(): T
// So you want to require a property? Use a trait getter!
trait fun(get) displayName: String
// You can define a tuple type with parenthesis
tuple Name (String, String) {
|(first, last)| impl fun to<String>() = "${first} ${last}"
@april
april / find-all-electron-versions.sh
Last active February 7, 2025 17:01
find all apps using Electron and their versions, on macOS systems
# latest supported electron version as of october 2024
LATEST_SUPPORTED_VERSION=30
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # no color
mdfind "kind:app" 2>/dev/null | sort -u | while read app;
do
filename="$app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
if [[ -f $filename ]]; then
@jeremiah-snee-openx
jeremiah-snee-openx / cSpell-Package-Dictionary.md
Last active May 17, 2023 15:16
cSpell Package Dictionary Generator

Code To Generate cSpell Dictionary from package.json

Makefile

cSpell:
  cat package.json | jq -r '.devDependencies, .dependencies | keys_unsorted | map(gsub("@"; "")) | map(split("/")) | flatten | unique[]' > ./.vscode/packages.txt

./.vscode/settings.json

@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active March 30, 2025 00:48
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@basarat
basarat / script.md
Created March 13, 2023 06:02
Promise Fulfilled vs Resolved

Notice that we’ve been using the term, fulfilled instead of resolved, and the reason is that a promise can be resolved to another promise and which point its fate becomes dependent on the other promise. If the other promise gets fulfilled our promise gets fulfilled, if the other promise is rejected, our promise gets rejected.

Both alpha and beta are resolved, but they settle to different fates. Alpha gets fulfilled, Beta gets rejected.

const delayFulfill =
  () => new Promise(
    res => setTimeout(() => res('fulfilled'), 1000)
 );
@markerikson
markerikson / react-data-fetching-lib-notes-2023-02-16.md
Last active May 15, 2023 11:04
React Data Fetching Library Summit notes - 2023-02-16

React Data Fetching Library Summit - 2023-02-16

Attendees

  • Lenz Weber-Tronic
  • Dominik Dorfmeister
  • Fredrik Hoglund
  • Jerel Miller
  • Alessia Bellisario
  • Andrew Clark
@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active April 1, 2025 03:12 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.