Skip to content

Instantly share code, notes, and snippets.

@eburlingame
eburlingame / clear-exclusion-list.js
Created October 22, 2023 22:26
Clear exclusion lists from Radarr
// Requires Node.js v18
const { readFileSync } = require("fs");
const API_KEY = "<Radarr API key>"
const BASE_URL = "https://<Radarr URL>/api/v3";
const options = {
credentials: "omit",
headers: {
"User-Agent":
@eburlingame
eburlingame / expr.js
Last active June 7, 2019 23:37
Todoist Filter Expressions
const BINARY_EXPRESSION = "BinaryExpression";
const UNARY_EXPRESSION = "UnaryExpression";
const IDENTIFIER = "Identifier";
const LITERAL = "Literal";
const SYMBOL_DECORATORS = ["@", "#"];
const binOps = {
"|": (l, r, env) => (l || r),
"&": (l, r, env) => (l && r)
};
@eburlingame
eburlingame / udp_listener.c
Created November 19, 2018 18:15
Simple UDP client in C using winsock2
// UDPListener.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <windows.h> // Needed for all Winsock stuff
#pragma comment(lib,"ws2_32.lib") //Winsock Library
#define PORT_NUM 5001 // Port number used
@eburlingame
eburlingame / xplane_client.c
Created November 19, 2018 17:52
Basic UDP client to get/set data from XPlane using C on Windows
#include "xplane_client.h"
/*----------------------------------------------
Statics
----------------------------------------------*/
static int client_s;
static sockaddr_in server_addr;
static sim_data_type current_state;
static char is_socket_open;
@eburlingame
eburlingame / XPlaneIntf.c
Created October 24, 2018 06:51
Basic data retrieval from X-Plane using winsock2 over UDP
// XPlaneC.cpp : Defines the entry point for the console application.
// References
// http://www.nuclearprojects.com/xplane/xplaneref.html
// http://www.nuclearprojects.com/xplane/info.shtml
// https://docs.microsoft.com/en-us/windows/desktop/winsock/windows-sockets-error-codes-2
// https://stackoverflow.com/questions/32471004/udp-client-not-receiving-udp-server-message
#include "stdafx.h"
#include <stdio.h>