Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active January 1, 2025 18:30
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.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@scyto
scyto / proxmox-cluster.md
Last active January 1, 2025 18:29
Proxmox cluster Setup

Proxmox cluster Setup

this gist is part of this series

Network Design

Put simply I am not sure what the design should be. I have the thunderbolt mesh network and the 2.5gbe NIC on each node. The ideal design guidelies cause my brain to have a race conditions because:

  1. ceph shold have a dedicated network
  2. proxmox should not have migration traffic and cluster communications network
  3. one wants cluster communicationsnetwork reddundant

每个 Python 程序员可能都会遇到这样的场景:你写了一个 Python 程序,可能是一个简单的、包含单个文件的 、只使用了标准库的 Python 脚本,抑或是一个庞大的、包含多个模块的、甚至引用了大量的第三方库的复杂 Python 应用,如何将他们送到目标用户手中,让他们能很顺利地使用起来呢?

一种方案就是写一个详尽的文档,连带着你的程序一起发送给用户。文档中要说明,目标用户如何在自己机器上安装 Python 环境及依赖的包,如何对程序进行配置,等等。但倘若你的目标用户没用过 Python 甚至不懂编程,此种方案执行起来便困难重重。

另一种方案,就是将 Python 程序“打包”成可执行程序(.exe),只要目标用户具备基本的电脑操作技能,便能很容易地将程序运行起来。

在 Windows 平台上,将 Python 程序“打包”为可执行程序(.exe)的方案很多,我尝试过的方案有如下几种:

@Gyarbij
Gyarbij / rclone.service.md
Last active January 1, 2025 18:22
Steps and example RClone systemd with mounted Google Drive or OneDrive for use with Plex en Jellyfin and other similar use-cases. Replace 'nano' with vi or your editor of choice if not on distro with nano included or because you like misery... your kinks are yours :)

CHANGE LEGEND: (you MUST replace these in the service file)

  • USERNAME = your actual username e.g. gyarbij
  • I recommend changing rclone.service to the name of eache drive if you have multiple mount points.
  • If you already have rclone mounts check Step #2 then skip to Step #4 and place your mount point at #MOUNT

Steps for RClone systemd to autostart on boot

  1. Install fusermount (if not already installed)
@mxgrn
mxgrn / audit-logs.sql
Created December 9, 2024 10:13
Track Postgres table changes in audit_logs
-- Step 1: Create the audit logs table
CREATE TABLE audit_logs (
id SERIAL PRIMARY KEY,
table_name TEXT NOT NULL,
operation TEXT NOT NULL,
json_diff JSONB,
inserted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Step 2: Create the trigger function
@mikegerber
mikegerber / Fix WSL2 vs VPN networking.md
Last active January 1, 2025 18:20
Fix WSL2 vs VPN networking

The problem

WSL2 uses a random network from the 172.16.0.0/12 RFC1918 private IP address block. And our VPN uses that address block, too, with a route metric of 1 (= most preferred.)

This breaks networking for WSL2. Meh!

The solution

While messing around with the interface/route metric of the VPN network may work around the problem, it also reduces the priority of the VPN. We do not really want this. Additionally, changing the interface metric does not seem to be permanent, so it requires more work when it breaks again.

@drego85
drego85 / upload_wpa-sec.py
Last active January 1, 2025 18:18
Script for automatic upload of handshakes to Distributed WPA PSK auditor (wpa-sec.stanev.org)
#!/usr/bin/env python3
#
# Script for automatic upload of handshakes captured
# by Pwnagotchi, Flipper Zero or Marauder to
# Distributed WPA PSK auditor (wpa-sec.stanev.org).
#
# The script is progressive, not sending to WPA Sec
# handshaske already analysed.
#
# The script also saves the detected WPA keys locally.
@topheman
topheman / .vimrc
Last active January 1, 2025 18:15
vim-config on Mac OS X
" Vundle config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@rjchatfield
rjchatfield / ArrayBuilder.swift
Last active January 1, 2025 18:14
ArrayBuilder - Swift ~~FunctionBuilder~~ ResultBuilder
@resultBuilder
public struct ArrayBuilder<Element> {
public static func buildPartialBlock(first: Element) -> [Element] { [first] }
public static func buildPartialBlock(first: [Element]) -> [Element] { first }
public static func buildPartialBlock(accumulated: [Element], next: Element) -> [Element] { accumulated + [next] }
public static func buildPartialBlock(accumulated: [Element], next: [Element]) -> [Element] { accumulated + next }
// Empty Case
public static func buildBlock() -> [Element] { [] }
// If/Else
@jhaddix
jhaddix / all.txt
Last active January 1, 2025 18:09
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎