Skip to content

Instantly share code, notes, and snippets.

@soatok
soatok / matrix.md
Last active May 17, 2024 13:57
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.

@OdinsHat
OdinsHat / esptool-in-linux.sh
Last active May 17, 2024 13:57
Esptool being used to install ESPEasy in Linux
#!/bin/sh
#this is the command to type when installing ESP Easy to your ESP8266 device.
sudo python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ESP_Easy_mega-20200426_dev_ESP8266_4M1M.bin

Taskmaster is a OneCommander utility to replace Explorer dialogs for file operations.

It uses Windows native APIs for Copy/Move operations and not hacks like some other copy/move replacements to speed-up operations. That means it won't break any speed records but it is as reliable as Explorer's operations.

Improvements over Explorer dialogs:

  • Ability to copy deep folder structures longer than 255 characters
  • Copied files and folders keep Created and Modified dates (Explorer creates folders on copy with a new date, ruining backups)
  • (Soon) Same theme/style as OC (including Dark theme that Explorer dialogs don't yet have)
  • (Soon) Prompts only once for elevation (Admin)
@arthcc
arthcc / hashNdSalt.md
Last active May 17, 2024 13:56
hashNdSalt.md

Aplicações de Segurança no Desenvolvimento de um Software

Estou desenvolvendo um ERP completo para a área de Odontologia, onde posso aprimorar meus conhecimentos e colocá-los em um projeto profissional real. Durante este período, estou utilizando o NestJs para criar os primeiros endpoints, incluindo um para login. Aprendi mais sobre como armazenar senhas em banco de dados e protegê-las usando Hash e Salt.

O que é Hash?

Em resumo, o hash pode ser considerado como uma função matemática que transforma qualquer arquivo ou conjunto de caracteres em uma sequência única de letras e números. Uma vez que o Hash é gerado, ele nunca mais pode ser alterado. O mesmo segue o padrão de ter o mesmo tamanho (entre 128 e 512 bits) e o mesmo número de caracteres alfanuméricos.

Uma função hash é unidirecional, semelhante a uma função sobrejetiva, onde a imagem é igual ao contradomínio. Um hash pode ser quebrado de várias maneiras por meio de ataques de força bruta ou dicionário.

@parmentf
parmentf / GitCommitEmoji.md
Last active May 17, 2024 13:56
Git Commit message Emoji
@boatbomber
boatbomber / release.luau
Last active May 17, 2024 13:56
Release workflow using Lune
--[[
release.luau - A Lune script for publishing Roblox games
MPL 2.0 License
(c) 2024, Zack Ovits
usage: lune run release
--]]
-- Lune libraries
local stdio = require("@lune/stdio")
@jgontrum
jgontrum / jwt_fast_api.py
Created August 29, 2019 12:21
JWT & FastAPI
import os
from typing import Dict, List, Optional
import requests
from jose import jwt, jwk
from jose.utils import base64url_decode
JWK = Dict[str, str]
JWKS = Dict[str, List[JWK]]
@kamilkrzyskow
kamilkrzyskow / performance_debug.py
Last active May 17, 2024 13:54
MkDocs hook for performance debugging
"""MkDocs hook for performance debugging
The idea behind it is to provide a minimal curated performance log for a `mkdocs build` run.
Of course anyone can use a proper profiler, but the output often contains a lot of non-critical data
that the user has to first filter to get a clearer picture. This hook takes care of this and allows
to quickly see where a bottleneck is occurring. It also has a lower overhead than a proper profiler.
It creates a file in the current working directory, it can be configured easily with variables set
at the bottom of the file. There are also the timing categories included.
@krzyspmac
krzyspmac / Deserialize.m
Created January 27, 2015 12:28
Serialize and deserialize PLIST to/from NSDictionary
// PLIST in NSData to NSDictionary
NSDictionary * result = [NSPropertyListSerialization propertyListWithData:data options:0 format:&format error:outError];
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files