Skip to content

Instantly share code, notes, and snippets.

View justinian's full-sized avatar
🦇
What a horrible night to have a curse.

Justin Miller justinian

🦇
What a horrible night to have a curse.
View GitHub Profile
@justinian
justinian / parse.py
Created November 1, 2023 06:13
Ark Survival Ascended save file parsing work
#!/usr/bin/env python3
def read_from(data, form):
import struct
n = struct.calcsize(form)
return data[n:], struct.unpack_from(form, data)[0]
def read_string(data):
data, n = read_from(data, "I")
@justinian
justinian / Makefile
Last active August 11, 2023 04:18
Clang and _GLOBAL_OFFSET_TABLE_
#CC = /home/justin/.local/lib/jsix/toolchains/llvm-13/bin/clang++
#LD = /home/justin/.local/lib/jsix/toolchains/llvm-13/bin/ld.lld
#CC = g++
#LD = ld
#CC = clang++-13
#LD = clang++-13
#LD = ld.lld-13
CC = clang++-16
LD = ld.lld-16
@justinian
justinian / profiles.json
Last active October 10, 2020 02:42
Windows Terminal configuration
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile" : "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
"copyOnSelect": true,
"alwaysShowTabs" : false,
"initialCols" : 120,
"initialRows" : 40,
"requestedTheme" : "system",
"showTabsInTitlebar" : true,
@justinian
justinian / linux-x64-nasm-cheatsheet.md
Last active March 26, 2024 20:07
x64 NASM Cheat Sheet

x64 NASM cheat sheet

Registers

64 bit 32 bit 16 bit 8 bit
A (accumulator) RAX EAX AX AL
B (base, addressing) RBX EBX BX BL
C (counter, iterations) RCX ECX CX CL
D (data) RDX EDX DX DL
@justinian
justinian / EDK2_2015_GUIDs-2017-04-27.csv
Created March 29, 2018 16:43 — forked from Velocet/EDK2_2015_GUIDs-2017-04-27.csv
EDK2 2015 GUIDs - Consolidated list of all *.dec/*.inf files as of 2017-04-27 (some duplicates removed)
00000000-0000-0000-0000-000000000000 Zero
00000000-0000-0000-0000-000000000000 EfiPartTypeUnused
00000000-0000-0000-0000-000000000000 EfiTpmDeviceInstanceNone
00160F8D-2B35-4DF2-BBE0-B272A8D631F0 FirmwarePerformanceDxe
00214CC1-06D1-45FE-9700-DCA5726AD7BF ArmVirtPlatformLib
0049858F-8CA7-4CCD-918B-D952CBF32975 VirtioFdtDxe
0053D9D6-2659-4599-A26B-EF4536E631A9 ShellAlias
0065D394-9951-4144-82A3-0AFC8579C251 EfiPeiRscHandlerPpi
00720665-67EB-4A99-BAF7-D3C33A1C7CC9 EfiTcp4ServiceBindingProtocol
00C86DB8-013B-4FF4-B8E9-208F4FCF1C00 LibSignal
@justinian
justinian / update_keys.sh
Created December 12, 2017 03:52
Script to update SSH keys from Github
#!/usr/bin/env bash
PROFILE=${1:-justinian}
USER=${2:-justin}
OUTFILE="/home/${USER}/.ssh/authorized_keys"
TEMPFILE=$(mktemp)
if curl -sL "https://github.com/${PROFILE}.keys" > "${TEMPFILE}"; then
if grep -q "ssh-rsa" "${TEMPFILE}"; then
@justinian
justinian / pillminder.ino
Created February 20, 2017 21:16
Pillminder Arduino Code
#include <Adafruit_LEDBackpack.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <Wire.h>
const char* ssid = "xxxxxx";
const char* password = "xxxxxxx";
const char* host = "api.pushover.net";
const int httpsPort = 443;
@justinian
justinian / joindomain.sh
Created January 12, 2017 19:35
Join a Debian Jessie box to an AD domain
#!/bin/bash
# This script should join Debian Jessie (8) to an Active Directory domain.
# Originally based on Alan D. Moore's script from his article "Joining Debian
# 8 to Active Directory"
# http://www.alandmoore.com/blog/2015/05/06/joining-debian-8-to-active-directory/
if [[ $1 == "--user" | $1 == "-u" ]]; then
shift
USER=`shift`
@justinian
justinian / sourceindex.md
Created January 9, 2017 16:41 — forked from baldurk/sourceindex.md
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
@justinian
justinian / awsexport.py
Created November 6, 2015 19:36
AWS credential exporter from .aws/credentials to environment vairables
#!/usr/bin/env python
import os
import os.path
from ConfigParser import SafeConfigParser
HOME = os.environ["HOME"]
CREDS = os.path.join(HOME, ".aws", "credentials")
def error(message):