Skip to content

Instantly share code, notes, and snippets.

writing games

Frank Hale frankhale

writing games
  • Seminole, Florida
View GitHub Profile
# Credit for this: Nicholas Swift
# as found at
from warnings import warn
import heapq
class Node:
A node class for A* Pathfinding
View wren amalgamation linker errors
/usr/bin/ld: /tmp/ccP4a8oZ.o: in function `prim_num_acos':
wren-test-almag.c:(.text+0xd2f6): undefined reference to `acos'
/usr/bin/ld: /tmp/ccP4a8oZ.o: in function `prim_num_asin':
wren-test-almag.c:(.text+0xd331): undefined reference to `asin'
/usr/bin/ld: /tmp/ccP4a8oZ.o: in function `prim_num_atan':
wren-test-almag.c:(.text+0xd36c): undefined reference to `atan'
/usr/bin/ld: /tmp/ccP4a8oZ.o: in function `prim_num_ceil':
wren-test-almag.c:(.text+0xd3a7): undefined reference to `ceil'
/usr/bin/ld: /tmp/ccP4a8oZ.o: in function `prim_num_cos':
wren-test-almag.c:(.text+0xd3e2): undefined reference to `cos'
View wren-test.c
#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 Mar 16, 2021
MassTransit ASPNET Core Azure ServiceBus config fail
View gist:4ea7a98af9451a71943ecd77efc66d55
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
Guessing this is not possible?
View MassTransitAPIEndPointTest.cs
public async Task Get_GetDefaultEndPoint_ReturnsOk()
// Arrange
var harness = new InMemoryTestHarness();
var consumerHarness = harness.Consumer<MyMessageConsumer>();
await harness.Start();
View MassTransitConfig.cs
services.AddMassTransit(x =>
x.AddBus(provider => Bus.Factory.CreateUsingInMemory(cfg =>
cfg.ReceiveEndpoint("mymessage-endpoint", ep =>
frankhale / Foo.cs
Created May 14, 2020
Map single object to list of objects in AutoMapper
View Foo.cs
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 Dec 2, 2018
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 Jun 15, 2017
Example of using YouTube-Search to perform a video search and then integrate the video duration into the results
View youtube-search-with-video-duration.js
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 / vs-code-settings.txt
Created Jun 9, 2017
Tesla theme custom colors (VS Code)
View vs-code-settings.txt
"workbench.colorCustomizations": {
"editor.background": "#111",
"tab.activeBackground": "#313",
"activityBar.background": "#333",
"editorGroup.background": "#111",
"sideBar.background": "#111",
"statusBar.background": "#222"
Theme: Tesla