Skip to content

Instantly share code, notes, and snippets.

View 166MMX's full-sized avatar

Johannes Harth 166MMX

View GitHub Profile
@166MMX
166MMX / c-struct-to-ksy.rb
Last active May 15, 2021 22:34 — forked from GreyCat/c-struct-to-ksy.rb
Convert C struct into Kaitai Struct spec (.ksy)
#!/usr/bin/env ruby
require 'yaml'
TYPE_TO_KSY = {
'uint8_t' => 'u1',
'uint16_t' => 'u2',
'uint32_t' => 'u4',
'uint64_t' => 'u8',
@166MMX
166MMX / signaling-server.ts
Created March 21, 2023 10:14 — forked from ronnyroeller/signaling-server.ts
Lambda function to provide webrtc signaling server
import { ApiGatewayManagementApi, DynamoDB } from 'aws-sdk';
import { scanItems } from './dynamodb';
const { AWS_REGION, TOPICS_TABLE } = process.env;
const dynamoDb = new DynamoDB({
apiVersion: '2012-08-10',
region: AWS_REGION,
});
@166MMX
166MMX / git-merge-associate.py
Last active January 2, 2024 15:43 — forked from tvogel/git-merge-associate
git script to manually associate files in a conflicting merge when rename detection fails
#!/usr/bin/env python
import dataclasses
import locale
import subprocess
import sys
"""
Purpose: Manually associate missed renames in merge conflicts during Git merges.
Usage: git merge-associate <our-target> <base> <theirs>