Skip to content

Instantly share code, notes, and snippets.

View darrenldl's full-sized avatar

Darren Li darrenldl

View GitHub Profile
{
"stats": {
"writev": 1,
"write": 93145,
"waitid": 19,
"wait4": 3,
"unlink": 200,
"uname": 128,
"umask": 18,
"tgkill": 1,
@darrenldl
darrenldl / letter.md
Last active October 4, 2021 09:32
Realist's romantic love letter, Darren Ldl

Realist's romantic love letter, Darren Ldl

This was originally somewhat written for someone I loved, whom shall not love me back. It's a finctional scenario that I thought would be quite romantic and could be an interesting discussion, but not meant to be an actual letter I'd write to the person. The original piece was in Chinese, I've translated it into English. Translation is rough around the edges, but close enough.


I am well aware of the idea that soul mate is at best a fictive hope. Further so, the assertion of existence of soul is quite simply illogical. It cannot be touched, cannot be seen, cannot be heard. It fundamentally cannot be measured. And quite obviously, a person's character depends solely on the composition of the brain, the development and memory. To put it bluntly, we are simply machines which fail to read ourselves. Overall, this is a ridiculous theory, a fairytale if you will. Some even believe in reincarnation! Ha! And love, love is merely a consequence of primal nature and phero

Simulation at data loss rate of 30.0%, at max redundancy of 100.0%, non-systematic
setup:
systematic: false
systematic scaling factor: 10.000
encode all drops upfront: false
data block count: 100
max drop count: 200
data block size: 1300
max redundancy: 100.000%
data loss rate: 30.000%
@darrenldl
darrenldl / closeboot.md
Last active July 6, 2021 14:21
Hooks for unmounting external USB on Arch

Hooks for unmounting external USB on Arch

Files

  • install_closeboot is the install hook
  • runtime_closeboot is the runtime hook

Instructions

  1. Copy install_closeboot to /usr/lib/initcpio/install/closeboot

Examples

"starting from 2020 Dec, every 2 months, second thursday"

(since_year 2020 (since_start_of_month `Dec (every_nth_month 2 (nth_weekday 2 `Thu entire_day))))

"every other day of year 2020"

@darrenldl
darrenldl / proof-of-attack_vs_proof-of-security.txt
Last active September 16, 2020 15:54
Notes on proof of attack vs proof of security
Proof of attack vs proof of security
Soundness (NO false positives, may false negatives)
- May miss out legitimate cases
- "Conservative" systems normally at least have soundness
Completeness (may false positives, NO false negatives)
- Never miss out legitimate cases, but may grab more than needed
Proof of attack (off sec)
- Under some premises, shows there exists an attack for a given system (e.g. protocol, software)

Cornell CS3110 2019 Chapter 8.2 Streams thought process

Context

This is a document in response to a Discord question on how to go about understanding the definition of nats in the chapter listed in title.

We cannot teach intuition, but giving one a more indepth view on how someone else thinks might allow one to draw inspirations and form intuitions more efficiently than just staring at a (very) abstract object for days.

Following documents some of the ways I dissected/thought about nats, as an attempt of achieving the above goal.

@darrenldl
darrenldl / ubuntu_luks_keyfile_guide.md
Last active July 14, 2023 17:18
Ubuntu keyfile boot

Ubuntu LUKS keyfile guide

Goal

We want to be able to set up an encrypted Ubuntu installation where we can unlock using just an external USB key without entering any passwords

We do not consider evil maid attacks in this case, and are only worried about data leak

We also assume USB key is kept securely, thus we are not concerned with USB key not being encrypted

@darrenldl
darrenldl / status
Created January 19, 2019 12:57
VLC status file text
3.0.6
http://get.videolan.org/vlc/3.0.6/vlc-3.0.6.tar.xz
VideoLAN and the VLC development team present VLC 3.0.6 "Vetinari".
VLC 3.0.6 is a minor update to VLC 3.0 branch, improving hardware decoding, Windows 10 and macOS mojave integration, RTSP, Bluray but also adding the support for a fast AV1 decoding.