Skip to content

Instantly share code, notes, and snippets.

View frankhale's full-sized avatar
writing games

Frank Hale frankhale

writing games
View GitHub Profile
<!DOCTYPE html>
<html lang="en-US">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Options With Dependencies</title>
<select id="select1" name="select1" title="Select 1">
<option value="">-- select an option --</option>
# Credit for this: Nicholas Swift
# as found at
from warnings import warn
import heapq
class Node:
A node class for A* Pathfinding
#include "wren.h"
#include <stdio.h>
#include <string.h>
void writeFn(WrenVM* vm, const char* text) {
printf("%s", text);
void fooBar(WrenVM* vm) {
WrenType type = wrenGetSlotType(vm, 1);
frankhale / gist:4ea7a98af9451a71943ecd77efc66d55
Last active March 16, 2021 14:05
MassTransit ASPNET Core Azure ServiceBus config fail
public void ConfigureServices(IServiceCollection services)
var queueTopic = "topic name here";
var sendQueueConnectionString = "Send EndPoint Connection String Here";
var receiveQueueConnectionString = "Receive EndPoint COnnection String Here";
// My intent is to have this ASPNET Core API publish and also be a consumer
frankhale / MassTransitAPIEndPointTest.cs
Last active May 20, 2020 00:21
Guessing this is not possible?
public async Task Get_GetDefaultEndPoint_ReturnsOk()
// Arrange
var harness = new InMemoryTestHarness();
var consumerHarness = harness.Consumer<MyMessageConsumer>();
await harness.Start();
frankhale / MassTransitConfig.cs
Created May 20, 2020 00:16
services.AddMassTransit(x =>
x.AddBus(provider => Bus.Factory.CreateUsingInMemory(cfg =>
cfg.ReceiveEndpoint("mymessage-endpoint", ep =>
frankhale / Foo.cs
Created May 14, 2020 20:01
Map single object to list of objects in AutoMapper
using AutoMapper;
using System.Collections.Generic;
namespace AutoMapperSandbox
public class SingleObjectToListConverter<T> : ITypeConverter<T, List<T>>
public List<T> Convert(T source, List<T> destination, ResolutionContext context)
return new List<T>() { source };
frankhale /
Created December 2, 2018 02:58
A Psuedo-code modeling of a typical MUD domain

Domain Model

This is a work in progress but is an attemp to model the domain of a typical MUD in psuedo-code


  • name (string)


frankhale / youtube-search-with-video-duration.js
Created June 15, 2017 16:55
Example of using YouTube-Search to perform a video search and then integrate the video duration into the results
const util = require("util");
const search = require("youtube-search");
const _ = require("lodash");
var xhr = require("xhr");
if (! xhr = require("request");
var opts = {
maxResults: 1,
key: "<YOUR_KEY_HERE>"
frankhale / IF-NOTES.txt
Last active March 21, 2017 14:44
***The 'properties' property is for anything that is game specific***
- current room
- moves
- score
- items
- properties (eg. health, gold, etc...)