Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active April 25, 2024 23:45
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

@corneil
corneil / sdk-java.sh
Last active January 31, 2024 18:40
Easily select java version and distribution with sdkman
#!/bin/bash
function sdkj() {
if [ "$1" == "" ]; then
echo "Expected Version prefix"
exit 1
fi
PREFIX=$1
CONTAINS=$2
# list candidates in the order they were installed. Last matching installed will be selected.
CANDIDATES=$(ls -tr ~/.sdkman/candidates/java/)
@turbo
turbo / brio.md
Last active January 18, 2023 16:24
Recording 4k 4:2:2 from Brio 4k In Linux using FFMpeg

Turn auto-exposure off, set absolute exposure to a low level and use gain to compensate for low light if needed. E.g.:

v4l2-ctl -d /dev/video2 -c exposure_absolute=400
v4l2-ctl -d /dev/video2 -c gain=110

# check with
v4l2-ctl -d /dev/video2 -L
@joevt
joevt / EDIDUtil.sh
Last active January 14, 2024 16:48
A set of shell functions used to view and edit EDIDs.
#!/bin/bash
#!/bin/zsh
# by joevt May 24/2023
#=========================================================================================
edid_decode=edid-decode
#=========================================================================================
# Modify EDID
@gsilos
gsilos / openssl-messenger.md
Last active September 10, 2023 19:28
secure communication

Why?

Since it is not possible to rely on the encryption that is provided for us in our daily applications (email, chat, etc), so, I decide to create this method as an alternative to quickly send sensitive data through current chat applications, email, etc.

How?

Using openssl in both sides (the sender and the receiver) is possible to exchange encrypted messages using our preffered chat application. In this process, I tied receiver's github account with his SSH public key, that way we can believe a little bit more if the receiver is who we think he is.

Before starting

@artizirk
artizirk / fix_maildir_mail_mtime.py
Created April 23, 2019 15:30
This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
#!/usr/bin/env python3
# This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
# If you use notmuch then you could do something like this to fix mtime on new mail
# notmuch search --output=files tag:new | xargs -P0 -i ~/code/mailutils/fix_maildir_mtime.py {}
import email
import sys
import os
from email.utils import parsedate_tz, mktime_tz
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@chandraratnam
chandraratnam / mutt_mbsync_multipleaccounts.md
Last active March 27, 2024 00:46
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]