Skip to content

Instantly share code, notes, and snippets.

View viluon's full-sized avatar
👁️
stop the race towards misaligned AI

Andrew Kvapil viluon

👁️
stop the race towards misaligned AI
View GitHub Profile
@hackermondev
hackermondev / zendesk.md
Last active May 16, 2025 13:07
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like [email protected]), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

@adriankeenan
adriankeenan / thinkpad_p1_gen4_usbcpd_charging.md
Last active October 10, 2024 15:34
ThinkPad P1 Gen 4 USB-C PD Charging Testing

The ThinkPad P1 has no official requirements for USB-C chargers. This is the result of testing a few different USB-C chargers on my Gen 4 P1.

Notes:

  • Machine BIOS is N40ET44W 1.26.
  • This configuration (i7 11850H, RTX A3000) shipped with a 230W AC charger.
  • Result wattage read from Lenovo Vantage on Windows 11 Pro.
  • Windows does not acknowledge unsupported chargers at all (eg does not show any error messages). A KDE desktop does show a message that the wattage is too low for unsupported chargers.
  • Tested with a 100W C-C cable or 100W TB4 cable.

| Charger | Charger Wattage | Result |

@MCJack123
MCJack123 / deflate-ans.lua
Last active July 1, 2024 00:29
A variant of DEFLATE using tabled asymmetrical numeral systems
-- DEFLATE-ANS: A variant of DEFLATE that uses asymmetrical numeral systems
-- instead of Huffman coding, increasing decompression speed with similar
-- compression ratios.
--
-- The block format matches RFC 1951 DEFLATE, with some minor adjustments:
-- * Bit fields are always stored most significant bit first, and bytes are
-- stored most significant byte first. This is for convenience in the bit
-- decoder.
-- * Huffman-encoded blocks are replaced with tANS-encoded blocks. These blocks
-- start with an initial X value (which is R bits long), followed by the codes
@hnaderi
hnaderi / reset-nix-proxy.sh
Created August 21, 2023 14:45
Set temporary proxy for nix-daemon
#!/usr/bin/env bash
rm /run/systemd/system/nix-daemon.service.d/proxy-override.conf
systemctl daemon-reload
systemctl restart nix-daemon
@Validark
Validark / aho-corasick.lua
Created July 18, 2021 12:31
A clean implementation of the aho-corasick algorithm taking full advantage of Lua's __index metamethod.
-- We can re-use metatables where possible
local lookupCache = {
__index = function(self, i)
local v = { __index = i }
self[i] = v
return v
end
}
local function use_aho_corasick(automaton, str)
@progandy
progandy / README.md
Last active September 26, 2023 08:27
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

@MCJack123
MCJack123 / unbios.lua
Last active March 15, 2025 17:36
UnBIOS: Load custom BIOSes in ComputerCraft without modifying ROM
-- UnBIOS by JackMacWindows
-- This will undo most of the changes/additions made in the BIOS, but some things may remain wrapped if `debug` is unavailable
-- To use, just place a `bios.lua` in the root of the drive, and run this program
-- Here's a list of things that are irreversibly changed:
-- * both `bit` and `bit32` are kept for compatibility
-- * string metatable blocking (on old versions of CC)
-- In addition, if `debug` is not available these things are also irreversibly changed:
-- * old Lua 5.1 `load` function (for loading from a function)
-- * `loadstring` prefixing (before CC:T 1.96.0)
-- * `http.request`

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

@spacejam
spacejam / rr-with-rust.md
Last active March 7, 2025 17:31
using rr with rust

using rust with rr

rr is a great debugging tool. it records a trace of a program's execution, as well as the results of any syscalls it executes, so that you can "rewind" while you debug, and get deterministic forward and reverse instrumented playback. it works with rust, but by default if you try it out, it could be pretty ugly when you inspect variables. if this bothers you, configure gdb to use a rust pretty-printer

rr is probably in your system's package manager.

usage

This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/