Skip to content

Instantly share code, notes, and snippets.

@faustinoaq
faustinoaq / myAngular.html
Last active November 6, 2024 02:28
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
@xproot
xproot / IAhijack.md
Last active October 10, 2024 23:27
Internet Archive hijack timeline

Please contribute to this by pointing out missing items of interest in the comments, dates are in UTC.

  • September 2024 -

28 September - The database for the Internet Archive is saved by the hijacker.

30 September - Troy Hunt, the founder of 'Have I been Pwned?' gets sent the database. [1]

  • Oct 6, 2024 -
@smx-smx
smx-smx / XZ Backdoor Analysis
Last active October 12, 2024 07:23
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@thesamesam
thesamesam / xz-backdoor.md
Last active November 4, 2024 18:32
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 November 2, 2024 14:41
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 October 12, 2024 01:34
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 November 4, 2024 14:53
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 |