Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View QuantumGhost's full-sized avatar
🇯🇵

QuantumGhost QuantumGhost

🇯🇵
  • 0xB29A14086516184D
  • 20:44 (UTC +08:00)
View GitHub Profile
@gingerBill
gingerBill / checklist.txt
Last active April 18, 2024 02:16
Language Design Checklist for Odin
You appear to be advocating a new:
[ ] functional [x] imperative [ ] object-oriented [x] procedural [ ] stack-based
[ ] "multi-paradigm" [ ] lazy [x] eager [x] statically-typed [ ] dynamically-typed
[ ] pure [x] impure [ ] non-hygienic [ ] visual [ ] beginner-friendly
[ ] non-programmer-friendly [ ] completely incomprehensible
programming language. Your language will not work. Here is why it will not work.
You appear to believe that:
[ ] Syntax is what makes programming difficult
[ ] Garbage collection is free [ ] Computers have infinite memory
@thesamesam
thesamesam / xz-backdoor.md
Last active April 23, 2024 12:44
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is still a new situation. There is a lot we don't know. We don't know if there are more possible exploit paths. We only know about this one path. Please update your systems regardless.

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

@phuslu
phuslu / bench_test.go
Last active January 23, 2024 10:24
fast parse DeletionTimestamp from pod
package bench
import (
"testing"
)
func BenchmarkParseDeletionTimestamp(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
_, _ = ParseDeletionTimestamp(data)
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@laixintao
laixintao / decent_request.py
Last active February 20, 2024 12:05
Send HTTP requests using python-requests with timeout, tcp reuse(session) and retry.
from requests.adapters import HTTPAdapter, Retry
from requests import Session
retries = Retry(
total=5, backoff_factor=1, status_forcelist=[502, 503, 504]
)
session = Session() # reuse tcp connection
session.mount("http://", HTTPAdapter(max_retries=retries))
session.mount("https://", HTTPAdapter(max_retries=retries))
@penglei
penglei / alacritty.yml
Created June 25, 2023 03:03
alacritty config
font:
normal: {}
size: 18.0
hints:
enabled:
- binding:
key: U
mods: Control|Shift
command:
program: /Users/penglei/.local/bin/open-haskell-doc
@surma
surma / .gitignore
Created February 1, 2023 15:48
Wasm GC
*.wasm
@Widdershin
Widdershin / ssr.md
Last active March 8, 2024 11:21
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.