Skip to content

Instantly share code, notes, and snippets.

@velzie
velzie / manifest-v2-chrome.md
Last active January 11, 2025 14:49
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@kconner
kconner / macOS Internals.md
Last active January 20, 2025 05:24
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@Dan-Q
Dan-Q / _no_code_page_.php
Last active October 12, 2024 16:49
Hacky PHP to produce a "blank" web page which somehow has content when viewed in Firefox. Sample page at https://danq.me/wp-content/no-code-webpage/, explanation at https://danq.me/nocode
<?php
// half-hearted CSS minification
$css = preg_replace(
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'),
array('$1{ ','$1$3;',"",'} '),
file_get_contents('linked.css')
);
// embed as a data: uri
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '=');
@gazzar
gazzar / ENV.yml
Last active February 10, 2024 02:14
modwave wavetable surface plots pdf generator
name: plots
channels:
- conda-forge
- defaults
dependencies:
- python=3.11.0
- tqdm
- numpy
- matplotlib
- colorcet
@jwbee
jwbee / readme.md
Last active September 13, 2024 14:27
Help me identify possible tracking device found in my car

Help me identify possible tracking device found in my car

TL;DR

I found a non-OEM electronic gadget in my car. It is wired into the ignition, and contains a 435.10 MHz radio reciever, a microcontroller, and two relays. I suspect it might be a device that allows third parties to unlock the doors and start the car with a radio.

Details

I was driving my 2020 Honda Insight EX when it started to make the annoying sound of an electromechanical relay rapidly switching on and off. When I got home I looked under the dash and straight away I could see someone other than Honda had been in here. The first thing I saw was this surface-mounted switch that doesn't belong there.

@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@tndata
tndata / gist:313688ffe2e2d24b676e2264a9943d5c
Created December 1, 2021 12:39
Sega MegaDrive development kit debugger
******************************************
*SEGA Megadrive comunication program *
*(c) 1991 Synchron Assembly *
*https://www.tn-data.se *
******************************************
*f1=trace, f2=skip instruction f4=go
*d xxxx set dissasm window, d pc
*m xxxx set memory window, m pc
*j xxxx set sega PC
@tndata
tndata / gist:95b14a32c10a01124ce64f81234715e0
Last active April 25, 2023 20:35
Sega MegaDrive hardware development kit firmware source code
* v 1.0 *
* BOOT ROM source for *
* for SEGA MEGADRIVE *
* 1991 Synchron Assembly *
* https://ww.tn-data.se *
**************************************
*sram start FF0000
_final:
ifd _final
dc.l $FFFE00 *Stack pointer
@motorailgun
motorailgun / idea.md
Last active June 18, 2024 06:22
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@psobot
psobot / kos_file_dumper.py
Last active June 13, 2023 16:27
Kurzweil KOS File Packer/Unpacker
"""
Kurzweil K2500/K2600 KOS operating system update file packer/repacker
by Peter Sobot, Nov 6, 2021
@psobot / [email protected]
Requirements: none! Pure Python. Just use Python 3.2+.
"""
import os
import math