Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active March 12, 2025 15:55
xz-utils backdoor situation (CVE-2024-3094)

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

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.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@MoshiurRahmanFaisal
MoshiurRahmanFaisal / Build and Run NVIDIA Docker with CUDA 11.3 on Pop!_OS or Ubuntu 20.04 LTS
Last active February 23, 2024 11:08
A simple guide to install Docker and Nvidia Docker to get CUDA Support on Docker Images
#!/bin/bash
### Step 1: Install Docker ###
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
### Step 2: Restart the Docker ###
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active March 13, 2025 07:41
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

"""
Mac 喝水提示
crontab -e
*/30 8-22/1 * * * [your python] [script path]
- 8点到20点每半小时提示一次喝水
"""
@slok
slok / pprof.md
Last active February 20, 2025 05:08
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@DzeryCZ
DzeryCZ / ReadingHelmResources.md
Last active February 12, 2025 22:05
Decoding Helm3 resources in secrets

Helm 3 is storing description of it's releases in secrets. You can simply find them via

$ kubectl get secrets
NAME                                                TYPE                                  DATA   AGE
sh.helm.release.v1.wordpress.v1                     helm.sh/release.v1                    1      1h

If you want to get more info about the secret, you can try to describe the secret

$ kubectl describe secret sh.helm.release.v1.wordpress.v1
/*
go test -bench=. -test.benchmem=true -test.benchtime=10s
goos: darwin
goarch: amd64
BenchmarkDirectCall-12 1000000000 1.31 ns/op 0 B/op 0 allocs/op
BenchmarkInterface-12 1000000000 1.69 ns/op 0 B/op 0 allocs/op
BenchmarkHoF-12 1000000000 1.61 ns/op 0 B/op 0 allocs/op
@amulyakashyap09
amulyakashyap09 / elastic_search_query.md
Last active January 13, 2025 18:06
How to query in elastic-search

Terminologies

We will be using following information throughout this article:

  • index_name : customers
  • index_type : personal
  • customer will have name,age,gender,email,phone,address,city,state as fields in schema for now

INFO Queries

@koshatul
koshatul / README.md
Last active March 12, 2025 06:09
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active March 15, 2025 14:25
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized