Skip to content

Instantly share code, notes, and snippets.

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active May 4, 2024 10:03
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@thesamesam
thesamesam / xz-backdoor.md
Last active May 19, 2024 20: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.

Background

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

@makamys
makamys / 1.7.10-essentials.md
Last active May 18, 2024 03:50
List of "Essential" 1.7.10 Mods

List of "Essential" 1.7.10 Mods

This is a list of Minecraft 1.7.10 mods that are not focused on adding new original content. Instead, they make the base game run better, or port over features from other versions of vanilla.

These lists try to comprehensively list all the available options. You will not want to use all of the listed mods at once.

Some of the listed mods require a Mixin bootstrap mod in order to work. See the Mixin mods section near the end of the document for information about that.

Table of Contents

@FrankHB
FrankHB / 20220808.md
Created August 8, 2022 09:42
关于所谓“弱类型”的误导问题

缘起

因为 Bilibili 莫名其妙吃回复,那就在这里存档。

原始内容见这里

如无另行指定,默认回复 @LanceMoe

预备 +TODO 改换文体,+FAQ

@shssoichiro
shssoichiro / settings.md
Last active April 28, 2024 22:26
aomenc settings (Updated 2022-09-18)

Current aomenc recommended settings for sharpness and detail retention:

--cpu-used=4 --cq-level=16 --end-usage=q --lag-in-frames=48 --enable-fwd-kf=1 --aq-mode=1 --deltaq-mode=0 --enable-chroma-deltaq=1 --quant-b-adapt=1 --enable-qm=1 --min-q=1 --enable-keyframe-filtering=0 --arnr-strength=1 --arnr-maxframes=4 --sharpness=3 --enable-dnl-denoising=0 --disable-trellis-quant=0 --threads=64

General CQ guidelines:

  • 40: Youtube quality
  • 30: Watchable, fine for streaming or lower bitrate encodes
  • 20: Good quality
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active May 20, 2024 02:30
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@wi7a1ian
wi7a1ian / async-enumerable.cs
Created October 7, 2020 09:31
Explanation of `EnumeratorCancellation` in async enumerable #async #csharp
public class Program
{
// https://docs.microsoft.com/en-us/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8
public static async Task Main(string[] args)
{
using var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(300));
/*
* Passing the token directly to the method is easier, but it doesn’t work when you’re handed an arbitrary IAsyncEnumerable<T>
* from some other source but still want to be able to request cancellation of everything that composes it.
* In corner-cases, it can also be advantageous to pass the token to GetAsyncEnumerator, as doing so avoids “burning in” the token
@GeeLaw
GeeLaw / CrtpBenchmark.cs
Created October 4, 2020 15:35
CRTP benchmark (C#)
/**** Benchmarking CRTP without virtual dispatch in C#.
See https://geelaw.blog/entries/csharp-crtp-static-polymorphism-friendship/
Results on my Surface Book 2:
| milliseconds | struct, non-virtual | struct, virtual | virtual |
| :----------: | :-----------------: | :-------------: | :-----: |
| x86 Core 3.1 | 1065 | 1405 | 1431 |
| x64 Core 3.1 | 1015 | 1371 | 1418 |
| x86 Fx 4.7.2 | 1160 | 1501 | 1490 |

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@socheatsok78
socheatsok78 / README.md
Last active December 10, 2023 19:56
lnav — Laravel Log Formatter

Laravel Log Formatter for Lnav


Installation

lnav -i https://gist.github.com/80d1d179c5706f85b281a5558217a5fe.git
# or
lnav -i git@gist.github.com:80d1d179c5706f85b281a5558217a5fe.git

Usage