Skip to content

Instantly share code, notes, and snippets.

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

Duncan Ogilvie mrexodia

❤️
‌‌
View GitHub Profile
@mrexodia
mrexodia / scrollbars.cpp
Created August 26, 2014 11:02
nice scrollbars
//scrollbar style (http://img0.www.suckmypic.net/img/N/k/bmSkF3Jp/chrome_scrollbar.png)
horizontalScrollBar()->setStyleSheet("QScrollBar:horizontal{border:1px solid grey;background:#f1f1f1;height:10px}QScrollBar::handle:horizontal{background:#aaa;min-width:20px;margin:1px}QScrollBar::add-line:horizontal,QScrollBar::sub-line:horizontal{width:0;height:0}");
verticalScrollBar()->setStyleSheet("QScrollBar:vertical{border:1px solid grey;background:#f1f1f1;width:10px}QScrollBar::handle:vertical{background:#aaa;min-height:20px;margin:1px}QScrollBar::add-line:vertical,QScrollBar::sub-line:vertical{width:0;height:0}");
#include <stdio.h>
#include <stdint.h>
#include <windows.h>
const char * ALPHABET32 = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789\0";
int MAGIC = 91717;
int g_dwSeed = 0;
int8_t getCharIndex(char c)
{
@mrexodia
mrexodia / undocumented.h
Last active July 27, 2021 16:09
universal PEB structure
#ifndef _UNDOCUMENTED_H
#define _UNDOCUMENTED_H
#include <windows.h>
namespace Undocumented
{
#pragma pack(push)
#pragma pack(1)
@mrexodia
mrexodia / main.cpp
Created October 17, 2014 09:17
Template Header/Source
//http://www.codeproject.com/Articles/48575/How-to-define-a-template-class-in-a-h-file-and-imp
#include <iostream>
#include <vector>
#include "Test.h"
#include "Test.cpp"
int main()
{
int n;
@mrexodia
mrexodia / LICENSE
Created November 1, 2014 19:32
UndoList
The MIT License (MIT)
Copyright (c) 2014
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@mrexodia
mrexodia / Encrypted iTunes Library.grammar
Created December 16, 2014 20:27
Encrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Encrypted iTunes Library" start="id:4" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for encrypted iTunes Library files.</description>
<structure name="Defaults" id="5" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="4" extends="id:5">
<structref name="hdfm" id="8" structure="id:7"/>
<binary name="encryptedData" id="9" length="remaining">
<description>This chunk of data is encrypted using AES/ECB/NoPadding with the key &quot;BHUILuilfghuila3&quot;. After decryption, you have to inflate the data using ZLIB.
@mrexodia
mrexodia / Decrypted iTunes Library.grammar
Created December 27, 2014 00:26
Decrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Decrypted iTunes Library" start="id:148" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for decrypted iTunes Library files.</description>
<structure name="Defaults" id="149" repeatmin="0" repeatmax="-1" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="148" repeatmin="0" repeatmax="-1" extends="id:149" order="variable">
<structref name="hdfm" id="152" repeatmin="0" repeatmax="-1" structure="id:151"/>
<structref name="msdh" id="154" repeatmin="0" repeatmax="-1" structure="id:153"/>
</structure>
<structure name="hdfm" id="151" length="this.headerLength" repeatmin="0" repeatmax="-1" extends="id:149" endian="big">
#include "FindPattern.h"
#include <algorithm>
#include <cctype>
#include <string>
using namespace std;
struct PatternByte
{
struct PatternNibble
@mrexodia
mrexodia / ClipboardTest.cs
Created January 17, 2015 18:30
ClipboardTest for GitExtensions
using System;
using System.Windows.Forms;
using System.Drawing;
namespace ClipboardTest
{
public class Form1 : Form
{
public Form1()
{
@mrexodia
mrexodia / command.cpp
Created March 21, 2015 23:00
Command Parser
#include "command.h"
Command::Command(const String & command)
{
ParseState state = Default;
int len = command.length();
for(int i=0; i<len; i++)
{
char ch = command[i];
switch(state)