Skip to content

Instantly share code, notes, and snippets.

View numinit's full-sized avatar

Morgan numinit

View GitHub Profile
@numinit
numinit / 0-index.md
Last active April 6, 2024 21:54
patch -p0 < fix-vega-reset.patch
From b8425aaca49e8f88d114426626cd8266e1e37d34 Mon Sep 17 00:00:00 2001
From: Morgan Jones <me@numin.it>
Date: Sun, 13 Mar 2016 00:56:04 +0000
Subject: [PATCH] Add quirks for Yuan Yuan Enterprises capture cards
---
drivers/pci/quirks.c | 7 +++++++
include/linux/pci_ids.h | 4 ++++
2 files changed, 11 insertions(+)
// ==UserScript==
// @name Remove Hackaday comments
// @namespace http://numin.it
// @version 0.6
// @description remove all potential clues that comments may exist on hackaday.com
// @author numinit
// @match http://hackaday.com/*
// @match https://hackaday.com/*
// @grant none
// ==/UserScript==
#!/usr/bin/env ruby
# usage: $0 <badge ID, in hex or decimal> (this is the number on the Call Jenny screen)
# keygen by numinit
# gr33tz dc858; Distractions, Inc
# NixOS rules
raise ArgumentError, <<EOF if ARGV.empty?
usage: #$0 <badge ID, in hex or decimal> (this is the number on the Call Jenny screen)
Note that you have to enter the following on the Play screen first:
@numinit
numinit / dtext.c
Last active January 31, 2022 14:07
Dumps in-memory text segments by single-stepping with ptrace. Usage: dtext <program> [args...]
/* Dumps in-memory text segments by single-stepping with ptrace.
* Usage: dtext <program> [args...]
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdlib.h>
@numinit
numinit / example-output.txt
Last active July 9, 2019 17:13
Point this script at a subfolder in your PUBG demos directory. Doesn't get all events (there are more in the UE4 checkpoint files), but will print some interesting stats about your match.
# ruby pubg-summarize.rb /mnt/c/Users/numinit/AppData/Local/TslGame/Saved/Demos/match.bro.official.2017-pre6.na.squad-fpp.2017.12.16.8585b819-02de-428e-bf07-19d9e721b782__USER__76561198040786185
Playing squad-fpp on Desert_Main - took 29.96 minutes
0.00: Weather: Clear, level Weather_Desert_Clear, weight 3
0.00: Map Desert_Main, weather Weather_Desert_Clear, region na, recorded by Hobocop, 0 players, 0 teams
=> Player senord, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.00km covered
=> Player groxers, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.00km covered
=> Player Hobocop, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.15km covered
101.89: Berry-o knocked out UnnamedPone
105.52: Datidol knocked out T3lamon
@numinit
numinit / numinit.clr
Last active September 13, 2018 15:34
my IDA colors
[DISASM]
000000 //Instruction
aaaaaa //Directive
f3c5ff //Macro name
7e6082 //Register name
666666 //Other keywords
ffffff //Dummy data name
b9ebeb //Dummy code name
b9ebeb //Dummy unexplored name
bbecff //Hidden name
from PIL import Image
import sys
def maskify(filename):
im = Image.open(filename)
px = im.load()
width, height = im.size
stride = 32
rows = []
@numinit
numinit / dexstrings.c
Last active July 1, 2017 16:20
dexstrings - see older revisions for what it used to output before I made it less verbose
/*
* gcc -Os -odexstrings dexstrings.c
* ./dexstrings /path/to/dex.dex
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
@numinit
numinit / food.c
Last active June 25, 2017 18:21
Google CTF: solving food the hard way
/* Made for the Google 2017 CTF
* Author: Morgan Jones <me at numin dot it>
*
* Compile: clang -std=gnu99 -fopenmp -O3 -funroll-loops -fomit-frame-pointer -ofood food.c
* Run: ./food <start percentage> <end percentage> [num threads=autodetect]
*/
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>