Skip to content

Instantly share code, notes, and snippets.

View magnus-trent's full-sized avatar
🏗️
Shaping my dreams into a digital form

Magnus magnus-trent

🏗️
Shaping my dreams into a digital form
View GitHub Profile
@leommoore
leommoore / file_magic_numbers.md
Last active August 12, 2025 08:32
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files

@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active August 9, 2025 05:46
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents