Skip to content

Instantly share code, notes, and snippets.

@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active December 19, 2025 17:41
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@Konfekt
Konfekt / c_compdb.vim
Last active December 19, 2025 17:41
Automatically generate compile_commands.json for clangd Language Server in Vim; put into ~/.vim/ftplugin/
" Generate compile_commands.json for clangd.
" Prefer CMake export, else Ninja compdb, else Bear + Make with optional append.
if exists('b:did_c_compdb_ftplugin') | finish | endif
let b:did_c_compdb_ftplugin = 1
let s:inflight = {}
augroup c_compdb
autocmd! * <buffer>
@hackermondev
hackermondev / writeup.md
Last active December 19, 2025 17:41
How we pwned X (Twitter), Vercel, Cursor, Discord, and hundreds of companies through a supply-chain attack

hi, i'm daniel. i'm a 16-year-old high school senior. in my free time, i hack billion dollar companies and build cool stuff.

about a month ago, a couple of friends and I found serious critical vulnerabilities on Mintlify, an AI documentation platform used by some of the top companies in the world.

i found a critical cross-site scripting vulnerability that, if abused, would let an attacker to inject malicious scripts into the documentation of numerous companies and steal credentials from users with a single link open.

(go read my friends' writeups (after this one))
how to hack discord, vercel, and more with one easy trick (eva)
Redacted by Counsel: A supply chain postmortem (MDL)

@EverythingSmartHome
EverythingSmartHome / All open windows and doors
Last active December 19, 2025 17:40
A collection of useful templates for Home Assistant dashboards
{{ states.binary_sensor
| selectattr('attributes.device_class', 'in', ['door','window'])
| selectattr('state', 'equalto', 'on')
| list | count }}
@ponceto
ponceto / haproxy.cfg
Created December 19, 2025 16:35
HAProxy full configuration with throttling for IA bots
#-----------------------------------------------------------------------------
# global: please note the localpeer declaration
#-----------------------------------------------------------------------------
global
localpeer self
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
@oscarychen
oscarychen / drf-exception-handling.md
Last active December 19, 2025 17:34
Exception handling in Django REST Framework

Exception Handling in Django REST Framework

In Django REST Framework views (this includes anything that might be called from a view), anytime when an exception occurs it will get handled by the framework.

  • If the Exception is DRF APIException, or Django PermissionDenied, the View will return the appropriate HTTP response with a HTTP status code and detail about the error.
  • If the Exception is other types of Django or Python Exceptions, HTTP 500 response will be returned.

To provide more customized error response with the appropriate status code, you will want to raise a subclass of APIException:

from rest_framework.exceptions import ValidationError
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 19, 2025 17:30
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@imrekoszo
imrekoszo / bash_strict_mode.md
Created December 19, 2025 17:30 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active December 19, 2025 17:30
set -e, -u, -o, -x pipefail explanation