Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.inclouds.space</string>
<key>ProgramArguments</key>
<array>
{
"output": {
"blocklist": [],
"compressor#0": {
"attack": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"bypass": true,
"dry": -100.0,
"hpf-frequency": 10.0,
@jwbee
jwbee / jq.md
Last active May 20, 2025 20:24
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@NatElkins
NatElkins / cloud-init.yaml
Created March 8, 2025 22:09
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban
host i-*
IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
ServerAliveInterval 120
User ec2-user
ProxyCommand sh -c "aws ec2 start-instances --instance-ids %h ; aws ec2 wait instance-running --instance-ids %h ; aws ec2-instance-connect send-ssh-public-key --instance-id %h --instance-os-user %r --ssh-public-key 'file://~/.ssh/id_rsa.pub' --availability-zone $(aws ec2 describe-instances --instance-ids %h --query 'Reservations[0].Instances[0].Placement.AvailabilityZone') ; aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
@vgel
vgel / r1.py
Last active May 20, 2025 05:48
script to run deepseek-r1 with a min-thinking-tokens parameter, replacing </think> with a random continuation string to extend the model's chain of thought
import argparse
import random
import sys
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
import torch
parser = argparse.ArgumentParser()
parser.add_argument("question", type=str)
parser.add_argument(
@awni
awni / mlx_distributed_deepseek.md
Last active May 22, 2025 02:24
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@kevmo314
kevmo314 / README.md
Last active February 24, 2025 21:11
Llama inference in 150 lines.

It turns out if you're just doing inference, Llama can be written very concisely. This implementation includes paged attention. Speculative decoding can also be added for another speed boost however it's quite verbose and was left out to keep the implementation cleaner.

Download the Llama files and place them in a directory ./Llama3.2-3B (or whatever flavor of Llama you want).

Your directory structure should look like:

./Llama3.2-3B/consolidated.00.pth
@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