Skip to content

Instantly share code, notes, and snippets.

View jkiv's full-sized avatar
😴

Jon Kivinen jkiv

😴
View GitHub Profile
@jkiv
jkiv / linode-update-dns.sh
Last active January 7, 2023 16:12
Linode Dynamic DNS
#!/bin/bash
# Updates Linode DNS records to the host's external IP, if the record differs.
# * Depends on curl(1) and jq(1).
# * Requires API key with read/write Domain permission.
# * Presumes IPv4 (A record).
#
# Author: jkiv (https://github.com/jkiv)
#
@jkiv
jkiv / setup.md
Created February 22, 2021 00:34
Customizing EmoTracker for OBS Transparency

Customizing EmoTracker for OBS Transparency

Method 1: Using Magenta Background

Modifying Tracker Background using Overrides

By default, a window capture of the "broadcast view" in EmoTracker (<F2>) gives a black/grey background in OBS. Here, we will make the background transparent in OBS by modifying a few files.

I'm using the "pughud" tracker for ALttPR, which I installed via the package manager. Though I'm using "pughud", this method likely applies to other trackers as well.

@jkiv
jkiv / setup.md
Last active February 20, 2022 17:03
Setting Up Auto-tracking in EmoTracker with SNES9X for A Link to the Past Randomizer

Setting Up Auto-tracking in EmoTracker with SNES9X for A Link to the Past Randomizer

Autotracking with Snes9x

Auto-tracking is done by running a Lua script in Snes9x which exposes the emulator's game memory to EmoTracker through a "socket" interface.

However, if you're using vanilla Snes9x there doesn't seem to be any interest from the developers to support this feature.

Instead, this feature was added to the Snes9x-rr fork of Snes9x and is maintained there separately. The latest release of Snes9x-rr can be downloaded from github.

@jkiv
jkiv / main.cpp
Created November 15, 2020 00:31
FTDI GPIO example
#include <iostream>
#include <iomanip>
#include <chrono> // for std::chrono::milliseconds
#include <thread> // for std::this_thread::sleep_for
#include "ftd2xx.h" // must be in project include path
/*** HELPER FUNCTION DECLARATIONS ***/
// Formats and writes FT_DEVICE_LIST_INFO_NODE structure to output
#include "sam.h"
#include "system.h"
#include "uart.h"
#include "flash.h"
#include "bitstream.h"
#include "print.h"
#define FLASH_DATA_START (0x00020000UL)
@jkiv
jkiv / b32.c
Last active April 9, 2019 13:48
Base32 Decoder in C.
#include <stdio.h>
#include <stdlib.h>
char b32_decode_char(char c);
void b32_decode(char** dst, size_t* dstlen, const char* src, size_t srclen);
void b32_decode(char** dst, size_t* dstlen, const char* src, size_t srclen)
{
size_t padlen = 0; // Number of ='s in padding
size_t lastlen = 0; // Length of last quantum in characters
@jkiv
jkiv / keybase.md
Last active October 7, 2018 02:54

Keybase proof

I hereby claim:

  • I am jkiv on github.
  • I am jkiv (https://keybase.io/jkiv) on keybase.
  • I have a public key whose fingerprint is 2B8D 297A 6E7B F171 3764 6F0F 578E 2297 0F7D 4CDC

To claim this, I am signing this object:

@jkiv
jkiv / README.md
Last active December 29, 2015 23:55
FrameLocator

FrameLocator

Finds needle iframes in haystacks of iframes.

// Find all windows whose name matches 'foo', relative to [window]
FrameLocator.findWindowsByName(window, 'foo');
// -> array of Windows

// Find all windows whose name matches 'bar', relative to [window]