Skip to content

Instantly share code, notes, and snippets.

View berkus's full-sized avatar
🎯
Practice your desensitization exercises to remain unfazed by enemy atrocities

Berkus Decker berkus

🎯
Practice your desensitization exercises to remain unfazed by enemy atrocities
View GitHub Profile
@hackermondev
hackermondev / zendesk.md
Last active April 22, 2025 06:38
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

@hirrolot
hirrolot / a-preface.md
Last active April 19, 2025 05:22
A complete implementation of the positive supercompiler from "A Roadmap to Metacomputation by Supercompilation" by Gluck & Sorensen

This is the predecessor of Mazeppa.

Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:

A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by th

@krzyzanowskim
krzyzanowskim / blogpost.txt
Last active June 28, 2024 07:03
Designing a Stunning macOS Icon for Your Text Editor: A Step-by-Step Guide https://twitter.com/krzyzanowskim/status/1653742801014726658
Title: Designing a Stunning macOS Icon for Your Text Editor: A Step-by-Step Guide
Introduction:
In the world of macOS applications, an eye-catching icon plays a crucial role in attracting users and conveying the essence of your software. When it comes to a text editor, your macOS icon should reflect the simplicity, elegance, and functionality of your application. In this blog post, we will explore the art of designing a stunning macOS icon for your text editor, step by step. Let's dive in!
Step 1: Understand Your Brand and Target Audience:
Before starting the icon design process, it's important to have a clear understanding of your brand and target audience. Ask yourself questions like: What are the unique features of your text editor? What emotions or feelings do you want your icon to evoke? Understanding your brand and target audience will help you create an icon that resonates with your users.
Step 2: Research and Inspiration:
Take some time to research existing macOS icons, especially those in the text

C++ spans: {*data,size} or {*b,*e} ?

Once Go has shown us the power of slices, there is no doubt that std::span was a very serious omittance in the original C++. Frankly, good old C codebases used the pointer+length metafor so often, it is difficult to explain why C++ got the construct this late. Probably, its designers considered non-owning pointers too rough or maybe too dangerous? An attempt to introduce a similar concept of std::string_view was clearly a failure and it was deprecated. At last, std::span is very widely recommended.

@emidoots
emidoots / ramblings.md
Last active December 25, 2024 04:39
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@urish
urish / raspberrypi4-native.cfg
Created November 4, 2021 01:43
OpenOCD Configuration for Raspberry Pi 4
interface bcm2835gpio
bcm2835gpio_peripheral_base 0xFE000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
bcm2835gpio_speed_coeffs 236181 60
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
@shirakaba
shirakaba / README.md
Last active March 27, 2025 15:25
GUI-based debugging of iOS/macOS Rust projects in Xcode

Here's how to get your environment set up to:

  1. Develop iOS and Android apps using Rust.
  2. Enable GUI debugging of Rust projects in Xcode.

If you just want to enable GUI debugging of macOS Rust projects in Xcode, I'm not actually sure whether you need cargo-mobile at all. But one benefit of installing it is that it automatically installs rust-xcode-plugin for you, giving you syntax highlighting of Rust sources in Xcode.

Prerequisites

cargo-mobile

diff --git a/emsdk.py b/emsdk.py
index 6d30c56..e2010bc 100644
--- a/emsdk.py
+++ b/emsdk.py
@@ -1241,12 +1241,12 @@ def find_latest_installed_tool(name):
# npm install in Emscripten root directory
def emscripten_npm_install(tool, directory):
- node_tool = find_latest_installed_tool('node')
- if not node_tool:
@LAK132
LAK132 / Makefile
Last active March 8, 2023 14:00
C++ embedded in a Makefile
#if 0
.PHONY: run
run: out.elf
./out.elf
out.elf: Makefile
g++ -o $@ -x c++ $^
ifeq (0, 1)
#endif
#include <stdio.h>
int main()
@skoe
skoe / ld.x
Last active September 12, 2022 18:32
Pure Rust Start-Up Code - Attempt 2
Add this to the linker script:
.text :
{
. = ALIGN(4);
/* Let the linker do the pointer arithmetic. The following values must
* have the same layout as struct MemInfo in the Rust init
* implementation. It must only contain FFI-safe types. For `LONG` refer
* to the GNU ld manual which is referenced by the LLVM lld manual:
* https://sourceware.org/binutils/docs/ld/Output-Section-Data.html