Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active March 22, 2024 22:58
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 December 28, 2023 18:01
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 October 15, 2022 03:44
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 November 16, 2023 03:13
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 / github@petersobot.com
Requirements: none! Pure Python. Just use Python 3.2+.
"""
import os
import math
@radiantly
radiantly / noMangleGoogle.user.js
Last active December 28, 2023 04:31
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==