Skip to content

Instantly share code, notes, and snippets.

@MarkKoz
MarkKoz / OSRS_HiScores.user.js
Last active November 17, 2017 16:48
A userscript which modifies the high scores table for the Old School RuneScape website.
// ==UserScript==
// @name OSRS HiScores
// @namespace orsrs_hs
// @description Modifies the high scores table for the Old School RuneScape website.
// @include *services.runescape.com/m=hiscore_*
// @version 1
// @run-at document-end
// @require https://code.jquery.com/jquery-3.2.1.slim.min.js
// ==/UserScript==
@MarkKoz
MarkKoz / ConvertAudio.ps1
Created May 25, 2017 00:43
A PS script which uses ffmpeg to convert all audio files of a specified extension in a directory to another codec.
class Files {
hidden [String] $iExt
hidden [String] $oCodec
hidden [String] $oExt
hidden [String] $iDir
hidden [String] $oDir
hidden [System.Object] $files
Files ([String] $iExt, [String] $oCodec, [String] $oExt) {
$this.iExt = $iExt
@MarkKoz
MarkKoz / DC6.ksy
Last active April 4, 2019 01:45
Diablo II's DC6 file format described with Kaitai.
meta:
id: dc6
title: Diablo CEL 6
application: Diablo II
file-extension: dc6
license: MIT
ks-version: 0.7
encoding: ASCII
endian: le
seq:
enum Result
{
OK = 1,
Fail = 2,
NoConnection = 3,
InvalidPassword = 5,
LoggedInElsewhere = 6,
InvalidProtocolVer = 7,
InvalidParam = 8,
FileNotFound = 9,
@MarkKoz
MarkKoz / vs-esque.clr
Created March 2, 2018 00:45
Dark Theme for IDA Pro - Visual Studio Inspired
[DISASM]
000000 //
dcdcdc //Default color
4e8b60 //Regular comment
3b6848 //Repeatable comment
666666 //Automatic comment
dcdcdc //Instruction
c57aaf //Dummy Data Name
c57aaf //Regular Data Name
9fe7f9 //Demangled Name
@MarkKoz
MarkKoz / Problem.ts
Last active May 11, 2018 05:54
Simple unit tester class using Node.js and TypeScript.
import * as assert from "assert";
import * as util from "util";
interface Test {
input: any[];
expected: any;
}
export class Problem {
readonly name: string;
@MarkKoz
MarkKoz / split_pdf_pages.py
Created May 21, 2018 21:26
Split PDF's Pages
from pdfrw import PdfReader, PdfWriter
fname = "Docs"
pdf = PdfReader(fname + ".pdf")
for i, page in enumerate(pdf.pages, 1):
writer = PdfWriter()
writer.addpage(page)
writer.write(f"{fname}-{i}.pdf")
@MarkKoz
MarkKoz / mci_cdaudio.py
Last active October 20, 2018 02:30
MCI CD Audio Test
from ctypes import *
from ctypes.wintypes import *
winmm = windll.winmm
class MciException(Exception):
def __init__(self, code):
self.code = code
success, self.message = mci_get_error_string(code)
@MarkKoz
MarkKoz / mci_cd_status.cpp
Last active November 4, 2018 03:33
MCI CD Drive Status
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <mmsystem.h>
#include <iostream>
int main()
{
MCI_OPEN_PARMS open_params;
::ZeroMemory(&open_params, sizeof(MCI_OPEN_PARMS));
@MarkKoz
MarkKoz / plugdj-playlist-api.md
Last active November 7, 2018 03:22
plug.dj Playlist API

Base URL: https://plug.dj/_

Response Object

Field Type Description
data array endpoint-specific return data
meta object unknown
status string unknown - success of the request?
time float unknown - time to process request?