Skip to content

Instantly share code, notes, and snippets.

View mrexodia's full-sized avatar
❤️
‌‌

Duncan Ogilvie mrexodia

❤️
‌‌
View GitHub Profile
@mrexodia
mrexodia / minheap.cs
Created May 28, 2016 16:33
Dijkstra + MinHeap implementation
//Implemented from http://www.cs.uu.nl/docs/vakken/ds/HoorC/Heap.pdf
public class MinHeap<T> where T : IComparable<T>
{
private readonly T[] A;
private int n;
public int Count { get { return n; } }
public MinHeap(int size)
{
@mrexodia
mrexodia / shades.ini
Last active April 25, 2019 11:50
Shades of gray by Joao Marques (http://i.imgur.com/ne8ZWpx.png)
[Colors]
AbstractTableViewBackgroundColor=#808080
AbstractTableViewHeaderTextColor=#000000
AbstractTableViewSelectionColor=#0F9FFF
AbstractTableViewSeparatorColor=#000000
AbstractTableViewTextColor=#000000
DisassemblyAddressBackgroundColor=#XXXXXX
DisassemblyAddressColor=#000000
DisassemblyAutoCommentBackgroundColor=#XXXXXX
DisassemblyAutoCommentColor=#008000
@mrexodia
mrexodia / darktheme.ini
Last active March 10, 2019 04:29
Dark Theme by tr4ceflow (https://i.imgur.com/1Jf38zh.png)
[Colors]
AbstractTableViewBackgroundColor=#272822
AbstractTableViewHeaderTextColor=#000000
AbstractTableViewSelectionColor=#363930
AbstractTableViewSeparatorColor=#555A4C
AbstractTableViewTextColor=#FFFFFF
DisassemblyAddressBackgroundColor=#XXXXXX
DisassemblyAddressColor=#AE81FF
DisassemblyAutoCommentBackgroundColor=#XXXXXX
DisassemblyAutoCommentColor=#808080
@mrexodia
mrexodia / mostlyblack.ini
Last active January 7, 2022 06:07
Mostly black and Jumps’n’calls by cypher (https://i.imgur.com/VY8LjdR.png)
[Colors]
AbstractTableViewBackgroundColor=#000000
AbstractTableViewHeaderTextColor=#000000
AbstractTableViewSelectionColor=#000080
AbstractTableViewSeparatorColor=#0000FF
AbstractTableViewTextColor=#FFFBF0
DisassemblyAddressBackgroundColor=#XXXXXX
DisassemblyAddressColor=#808080
DisassemblyAutoCommentBackgroundColor=#XXXXXX
DisassemblyAutoCommentColor=#808080
@mrexodia
mrexodia / ImportParser.cpp
Last active September 12, 2022 16:10
PE Import Table Parser
#include <windows.h>
#include <stdio.h>
int gtfo(const char* text = "")
{
printf("gtfo! (%s)\n", text);
return -1;
}
int main(int argc, char* argv[])
@mrexodia
mrexodia / out.asm
Last active March 28, 2016 16:48
VMProtect tracing fun :)
--- TRACER STARTED ---
Process 7332 created with entry 0x00007FF6CDF9251E
DLL loaded at 0x00007FFDCD1D0000
DLL loaded at 0x00007FFDCB2B0000
DLL loaded at 0x00007FFDCA680000
DLL loaded at 0x00007FFDCA8B0000
DLL loaded at 0x00007FFDC8F30000
DLL loaded at 0x00007FFDCB870000
DLL loaded at 0x00007FFDCD070000
DLL loaded at 0x00007FFDCAE50000
@mrexodia
mrexodia / import.sh
Created February 15, 2016 06:55
Gogs migration script
#!/bin/bash
git clone ssh://fromhost.com/home/fromuser/$1.git
cd $1
git remote remove origin
git remote add origin https://tohost.com:443/touser/$1.git
git push origin --all
cd ..
rm -rf $1
@mrexodia
mrexodia / main.cpp
Last active March 28, 2016 16:48
ExceptionHandlerTest
#include <windows.h>
#include <stdio.h>
static LPTOP_LEVEL_EXCEPTION_FILTER OldFilter;
static char callOrder[10] = "";
int main()
{
OldFilter = SetUnhandledExceptionFilter([](PEXCEPTION_POINTERS ExceptionInfo) -> LONG
{
@mrexodia
mrexodia / TemplateHacks.cpp
Last active March 28, 2016 16:48
Variadic templates to solve C-style message callback problems
#include <stdio.h>
#include <stdarg.h>
#include <vector>
enum Message
{
MsgAdd, //int(int, int)
MsgNeg, //int(int)
MsgRand, //int()
};
/******************************************************************************
* File: GraphProcessor.cpp
* Author: Carsten Gutwenger
*
* Implements some helper functions for drawing graphs.
*
******************************************************************************
*
* Copyright (c) 2010-2011 Carsten Gutwenger
* All rights reserved.