A cheerful & colorful Fish function I wrote to keep my Discord and Vencord installations up to date on my Arch machine.
This function assumes that you have the following installed:
- git
- node
- pnpm
- wget
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 |
A cheerful & colorful Fish function I wrote to keep my Discord and Vencord installations up to date on my Arch machine.
This function assumes that you have the following installed:
// 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}" | |
# 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 |
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.
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)
);
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.
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.
A number of things have happened since the last update.