Skip to content

Instantly share code, notes, and snippets.

View Treeki's full-sized avatar

Ash Wolf Treeki

View GitHub Profile
# Usage:
# 1. Install twurl from RubyGems
# 2. Create a Twitter app at https://apps.twitter.com/ (if you don't have one)
# 3. twurl authorize --consumer-key ldny[...]ulfQ --consumer-secret MTXY[...]TRsI
# 4. bash tweet_deleter.sh 2010-05 tweets.csv
# Use at your own risk ;)
# Notes for using multiple accounts with twurl:
@Treeki
Treeki / config.example.json
Last active August 1, 2019 17:13
FurAffinity -> Pushbullet Notifications
{
"username": "ninji-vahran",
"database": "notifier.db",
"cookies": {
"__cfduid": "REDACTED",
"a": "REDACTED",
"b": "REDACTED",
"folder": "inbox"
},
"pushbullet_key": "REDACTED",
# A terrible script that really should be using the Twitter gem rather than
# calling into twurl.
#
# (This was originally a shell script, but my POSIX-fu wasn't good
# enough to figure out how to get it to work on Mac OS...)
#
# Usage:
# $ ruby twitter_unblocker.rb /path/to/twurl
# Example:
# $ ruby twitter_unblocker.rb `where twurl`
@Treeki
Treeki / eq_solver.c
Created September 16, 2015 01:38
a mediocre linear equation solver written in C
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
enum OpType { OpNull = 0, OpAdd, OpSubtract };
typedef int64_t eqVal;
#define eqPRI PRIi64
@Treeki
Treeki / unstir.py
Created December 29, 2016 22:43
Super Mario Run .stir file decrypter
# fun fact:
# this is internally referred to as 'SimpleEncryption'
# it is pretty damn simple, really
import sys
KEY = 0x5D
INITIAL_SPAN = 0x200
SPAN = 0x100
input_name = sys.argv[1]
@Treeki
Treeki / lzma_sample.cpp
Created May 24, 2017 21:52
simple LZMA SDK compression/decompression example
// note: -D_7ZIP_ST is required when compiling on non-Windows platforms
// g++ -o lzma_sample -std=c++14 -D_7ZIP_ST lzma_sample.cpp LzmaDec.c LzmaEnc.c LzFind.c
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <memory>
#include "LzmaEnc.h"
#include "LzmaDec.h"
@Treeki
Treeki / kitterspeak.md
Last active January 31, 2018 16:48
Kitterspeak Reference

Kitterspeak Reference

This document is meant to be a reference for users and implementers of Kitterspeak, a scripting language for animating graphical shapes used by the MMOSG Furcadia.

Concept

Each Furcadia shape has four layers, at which it may draw its frames. These are, in order from bottom to top:

  • BG - background,
  • BEHIND - behind furre,
  • furre (not directly usable),
  • FRONT - in front of furre,
  • FG - foreground.
@Treeki
Treeki / gds_read.py
Created March 29, 2018 20:02
fucking around with Professor Layton and the Curious Village
import struct
import sys
# 1 is maybe s32?
# Commands:
# Room In --
# 18 -- (8?)
# 88 -- (1:a, 6:b)
# 236 -- (1:a, 1:b)
tilenum = 0x300
tileset = 3
framedelays = 4,4,4,4
texname = ww_300.bin
end tile
tilenum = 0x301
tileset = 3
@Treeki
Treeki / odeus.py
Last active September 24, 2022 00:15
# runs under Python 2 (yes, I know...)
# required modules: pip install unicorn pefile
# this code is made available under the MIT license, as follows:
# Copyright (c) 2018 Ash Wolf
# 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