Skip to content

Instantly share code, notes, and snippets.

View SirTony's full-sized avatar

Tony Stark SirTony

  • Philadelphia, PA, USA
View GitHub Profile
@SirTony
SirTony / rpa.py
Created May 12, 2017 06:35
RenPy archive unpacker
from pickle import loads as unpickle
from zlib import decompress
from argparse import ArgumentParser
from sys import exit, stderr
import os
def _main():
parser = ArgumentParser( description = "RenPy Arhive (.rpa) unpacker" )
parser.add_argument( "-o", "--output", required = False, type = str, dest = "output", metavar = "dir", help = "The directory to output files to" )
parser.add_argument( "-i", "--input", required = True, type = str, dest = "input", metavar = "path", help = "The archive to unpack" )
@SirTony
SirTony / Fallout 4 Save File Format.md
Last active October 30, 2023 21:03
The binary format for Fallout 4 PC save files.

Fallout 4 Save File Format

The binary format for Fallout 4 PC save files. This document was created by reverse-engineering files from version 1.2.37.0 of the game.

Note: This document is incomplete!

Table of Contents

@SirTony
SirTony / dylib.d
Last active February 18, 2016 06:05
A utility for loading exported functions from a shared library.
module dylib;
private {
import std.string : format, toStringz;
import std.exception : enforce;
version( Windows )
{
extern( Windows ) void* LoadLibraryA( const char* );
extern( Windows ) void* GetProcAddress( void*, const char* );
@SirTony
SirTony / togethertube-fullscreen.user.js
Last active January 5, 2017 07:23
A greasemonkey/tampermonkey userscript for enabling fullscreen on https://togethertube.com/
// ==UserScript==
// @name Togethertube Fullscreen
// @namespace https://github.com/SirTony
// @version 0.2
// @description Enables fullscreen on togethertube.com
// @author Tony J. Ellis
// @match https://togethertube.com/rooms/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.18.4/URI.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.18.4/SecondLevelDomains.min.js
@SirTony
SirTony / 0.HowTo.md
Last active August 29, 2015 14:26
Visual Studio Code syntax definition for the D programming language.

How to install

  1. Locate the Visual Studio Code's installation directory (usually this is C:\Users\<UserName>\AppData\Local\Code\app-<version> where <UserName> is the current Windows user name, and where <version> is the version you want to modify [e.x. 0.4.1])
  2. Navigate to <InstallPath>\resources\app\plugins where <InstallPath> is the path you located in step 1.
  3. Create a new folder named vs.language.d and open it.
  4. Inside of vs.landuage.d create a new folder named syntaxes and open it.
  5. Save or download the d.json file in this gist and place it inside the syntaxes folder.
  6. Restart all instances of Visual Studio Code.
  7. Done.
@SirTony
SirTony / Mond.YAML
Created June 25, 2015 08:07
Mond syntax definition for Sublime Text and TextMate.
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Mond
scopeName: source.mond
fileTypes: [ mond, mnd ]
uuid: 0a4b2933-843d-45c6-bd2f-6615d69f3800
# This syntax definition could be a lot more advanced,
# but it properly colours all the important stuff,
# so it's good enough for now.
@SirTony
SirTony / ResourcePool.cs
Created April 2, 2015 23:05
A mirror of the ResourcePool<T> from xnawiki.com
/// <summary>
/// A pre-allocated pool of objects with the ability to sort
/// and maintain objects as they become invalidated.
/// </summary>
/// <typeparam name="T">The type of object the pool will hold.</typeparam>
public class ResourcePool<T> where T : class
{
#region Variables
private ValidateObject objectCheck;
@SirTony
SirTony / Fakku.user.js
Last active July 22, 2017 07:00
A simple userscript to enable direct-downloading of content on fakku.net
// ==UserScript==
// @name FAKKU! Download
// @namespace https://github.com/SirTony
// @version 1.8
// @description Enables direct-downloads on FAKKU.net
// @author Tony J. Ellis
// @include /^https?:\/\/(?:www\.)?fakku\.net\/(?:manga|doujinshi)/
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js
// @require https://raw.githubusercontent.com/Stuk/jszip-utils/master/dist/jszip-utils.min.js
@SirTony
SirTony / grep.d
Created March 2, 2015 19:59
A grep-like tool written in D.
module grep;
private:
import std.stdio;
import std.regex;
import std.getopt;
import std.range;
import std.file;
import std.path;
@SirTony
SirTony / Callback.d
Last active August 29, 2015 14:15
A struct that wraps both function and delegate types, allowing them to be used interchangeably.
final struct Callback( TRet = void, TArgs ... )
{
public alias TRet delegate( TArgs ) DelegateType;
public alias TRet function( TArgs ) FunctionType;
private DelegateType dg;
private FunctionType fn;
public this( DelegateType dg ) { this.dg = dg; }
public this( FunctionType fn ) { this.fn = fn; }