Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
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

@aserranoni
aserranoni / gist:3ff260f52a61180036e63181fc87cd77
Created October 19, 2023 01:58
A life without yabai window borders
# I've been using a combination of yabai, skhd (with modal keybindings), and sketchybar.
## Recently, with the deprecation of the window border in yabai. I had to find a way to
## keep track of the skhd current mode.
# Add the following lines to sketchybarrc:
sketchybar --add item mode_indicator left
sketchybar --set mode_indicator drawing_method=separator
sketchybar --set mode_indicator label="default-mode | "
@lorenzleutgeb
lorenzleutgeb / committer-progress.sh
Last active March 26, 2025 23:23
Nixpkgs Committer Progress
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gh
set -eu
# See <https://gist.github.com/lorenzleutgeb/239214f1d60b1cf8c79e7b0dc0483deb>.
# Will exit non-zero if not logged in.
gh auth status
if [ $# == 1 ]
@marcopaganini
marcopaganini / how-to-remove-git-crypt.md
Last active October 10, 2024 08:49
How to remove git-crypt from your repo (maintaining history).

How to remove git-crypt and maintain your history

I've been successfully using git-crypt to provide provide partial encryption to some of my repos. It's a great program and I'd definitely recommend it for your git repository encryption needs.

However, while installation is quite simple, I couldn't find good instructions on how to uninstall git-crypt and maintain history intact.

This guide provides simple instructions on how to accomplish that. In the end,

@kdorff
kdorff / moisture-1.yml
Created May 18, 2022 02:32
ESPHome code for moisture sensors
# Reads analog data using an ads1115. Three moisture sensors and a battery sensor.
# Goes to sleep for an hour at a time.
# Uses a helper input_boolean to keep it from going to sleep, in case you want to update it.
esphome:
name: moisture-1
platform: ESP32
board: esp32dev
on_boot:
then:
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2025 18:48
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@felipou
felipou / decrypt_dbeaver.py
Last active February 11, 2025 10:48
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@adrianlzt
adrianlzt / sharescreen
Last active January 7, 2022 07:14
Scripts to share only a portion of the screen
#!/bin/bash
# Modified version of https://github.com/Ashark/hliss/blob/master/vlc-hangouts
# Script to share a portion of the screen in VLC to be used by Chrome/Firefox to share the screen
# By default, when run, it asks to click in some window. The area of that window is what is going to be shared.
# If executed with "sharescreen area", it asks for a portion of the screen to be shared.
unset x y w h
# Old code to choose a monitor
@kylebrandt
kylebrandt / i3hangout.md
Last active June 27, 2023 15:50
i3 Hangout / Meet VLC screensharing workaround mutli-monitor

Share an area of your screen by using vlc screen capture, and then sharing the vlc capture window

Make sure the VLC window floats

In i3 config:

for_window [window_role="vlc-video"] floating enable move down 100px;

We float it so the tiling window manager doesn't resize the window and mess up the scale. We also move the window placement down at launch so it easy to drag somewhere mostly offscreen.

# Split the logs in separate files
echo Splitting...
csplit r-ryantm '/2018-..-..T..:..:.. .* [^ ]* -> [^ ]*/' '{*}' 1>/dev/null
# rename xx* to xx*-package-name
echo Renaming...
parallel -j30 "mv {} {}-\$(head -n1 {} | cut -d' ' -f2)" ::: xx*
echo Separating...