Skip to content

Instantly share code, notes, and snippets.

View HugoPeters's full-sized avatar
💭
yee

Hugo Peters HugoPeters

💭
yee
View GitHub Profile
@craigmccauley
craigmccauley / HtmlRenderer.cs
Created December 3, 2022 18:37
Renders Blazor Components and Razor Views into HTML
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Abstractions;
@bkaradzic
bkaradzic / orthodoxc++.md
Last active February 25, 2026 12:28
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@protrolium
protrolium / ffmpeg.md
Last active March 13, 2026 07:55
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active March 13, 2026 01:51
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,

@rygorous
rygorous / gist:1440600
Created December 6, 2011 23:36
PPC rlwinm/rlwimi equivalent C code
static inline U32 ppcmask(U32 mb, U32 me)
{
U32 maskmb = ~0u >> mb;
U32 maskme = ~0u << (31 - me);
return (mb <= me) ? maskmb & maskme : maskmb | maskme;
}
static inline U32 rotl32(U32 x, U32 amount)
{
return (x << amount) | (x >> ((32 - amount) & 31));