Skip to content

Instantly share code, notes, and snippets.

@soatok
soatok / matrix.md
Created May 15, 2024 04:02
Why I Don't Trust Matrix Developers to Produce a Secure Protocol

Ever since I wrote It's Time For Furries to Stop Using Telegram, I've had a few folks ask me about my opinion on Matrix.

(I've also had a few people evangelize Matrix in my mentions. That's annoying.)

My stance on Matrix has been the same for years: I don't trust the Matrix developers to produce a secure protocol, and until they abandon Olm / Megolm in favor of something like MLS, I'm adamant about refusing to trust their team's designs.

To understand why I feel so strongly about this, you need to understand that practically exploitable vulnerabilities were found in Matrix in 2022.

It isn't enough that there were vulnerabilities found to be alarming. Vulnerabilities happen. You aren't writing software if you don't occasionally fuck up.

@ReneNyffenegger
ReneNyffenegger / peb.c
Created March 21, 2021 19:50 — forked from Wack0/peb.c
Getting a pointer to the PEB in C, for every architecture that NT was ported to (where at least one build of the port was leaked/released)
// Gets a pointer to the PEB for x86, x64, ARM, ARM64, IA64, Alpha AXP, MIPS, and PowerPC.
// This relies on MS-compiler intrinsics.
// It has only been tested on x86/x64/ARMv7.
inline PEB* NtCurrentPeb() {
#ifdef _M_X64
return (PEB*)(__readgsqword(0x60));
#elif _M_IX86
return (PEB*)(__readfsdword(0x30));
@jeroen-meijer
jeroen-meijer / .gitignore
Created September 12, 2018 04:47
General Flutter .gitignore (including VS Code, IntelliJ & Firebase files).
### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Android.gitignore
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
@tynanbe
tynanbe / dynamic_demo.gleam
Last active May 15, 2024 06:21
Proposed Gleam tuple spread syntax
import gleam/dynamic.{DecodeErrors, Dynamic, field, int, list, string}
import gleam/io
import gleam/json
import gleam/list
import gleam/result
type DynResult(a) =
Result(a, DecodeErrors)
pub opaque type Collector(a) {
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@efrecon
efrecon / run.tpl
Last active May 15, 2024 06:18
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@AbhieSpeaks
AbhieSpeaks / dev-setup.md
Last active May 15, 2024 06:18 — forked from leodutra/-setup-windows-wsl-devenv.md
Development environment setup: Installing WSL2, Hyper, ZSH, VSCode, OhMyZsh

Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

Preview

Requirements

Steps

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 15, 2024 06:17
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@aliyome
aliyome / test.md
Last active May 15, 2024 06:15
レガシーVBはもういやだ

Modern Visual Basic

2014.5.10


はじめに

今日話す内容は

@tongyx361
tongyx361 / gpu-monitor-with-executor-and-email.py
Created August 1, 2023 17:10
Python script that monitors GPU usage on a machine and executes jobs when GPUs are available.
"""
GPU Monitor with Email and Execution
This script monitors the usage of GPUs on a system and, when there are enough free GPUs, execute a specified function.
The function run a bash script by default but could be any other executable code.
This script uses the GPUtil library to monitor GPU usage.
Preparation:
1. `pip install GPUtil`
2. define your own `func` if needed