Skip to content

Instantly share code, notes, and snippets.

View JamoCA's full-sized avatar

James Moberg JamoCA

View GitHub Profile
@JamoCA
JamoCA / Morality-and-Usage-of-AI-in-Games.md
Created October 26, 2026 23:16
Morality and Usage of AI in Games

Morality and Usage of AI in Games

2026-10-25

This information was collected for an meetup on the topic of "Morality and Usage of AI in Games" for the Monterey Bay Game Developers Meetup on Sunday, October 25, but we ran out of time before we could have the discussion.

Here's a working agenda so a facilitator can run it in roughly this order, but each section stands alone.

1. Frame the conversation first

@JamoCA
JamoCA / cfml-reserved-words-report.md
Created October 26, 2026 17:51
Reserved Words Across Adobe ColdFusion, Lucee CFML, BoxLang, and SQL Server

Reserved Words Across Adobe ColdFusion, Lucee, BoxLang, and SQL Server

Prepared 2026-10-26 for code that must run unchanged on Adobe ColdFusion 2016-2025, Lucee 5/6, and BoxLang 1.x, against SQL Server 2019.

Summary

The four runtimes disagree about what "reserved" means, and the safe set is the union of all four, not the intersection. Three distinct failure modes show up:

@JamoCA
JamoCA / standardizeTimestamp.cfm
Created August 12, 2026 18:07
standardizeTimestamp - ColdFusion UDF: ParseDateTime is a black box and doesn't support all date/time strings
<!--- 2026-08-12 11:06 - standardizeTimestamp UDF - Because ParseDateTime is a black box and doesn't support all date/time strings. --->
<cfscript>
public string function standardizeTimestamp(required string timestamp, string timeZone="America/Los_Angeles") hint="I parse common date, time and timestamp strings (including ODBC literals and compact digit forms) and return them normalized to provided time zone as yyyy-mm-dd HH:nn:ss" {
var input = trim(arguments.timestamp);
var zoneId = createobject("java", "java.time.ZoneId").of(arguments.timeZone);
var dtfClass = createobject("java", "java.time.format.DateTimeFormatter");
var outFormatter = dtfClass.ofPattern("yyyy-MM-dd HH:mm:ss");
var enLocale = createobject("java", "java.util.Locale").ENGLISH;
var litType = "";
var m = "";
@JamoCA
JamoCA / cancel-subscriptions.md
Last active June 9, 2026 00:34
How to Cancel Subscriptions Without the Runaround

How to Cancel Subscriptions Without the Runaround

https://x.com/hrswatigupta/status/2060722921493176528

Posted by Swati Gupta (@hrswatigupta) on X

I tried to cancel 4 subscriptions yesterday.

Three of them forced me to call, wait 45 minutes, and listen to a "retention specialist."

@JamoCA
JamoCA / fix-gmail-ingbox.md
Created June 8, 2026 22:53
22 Ways to Fix Your Weaponized Gmail Inbox (Without Deleting It)

22 Ways to Fix Your Weaponized Gmail Inbox (Without Deleting It)

Saved from https://x.com/thetripathi58/status/2063290403839947131

A guy sat at his laptop ready to permanently delete his 15-year-old Gmail account.

He was getting 400 spam emails a day. Fake Best Buy receipts. Phishing links from "Netflix." Cryptic extortion threats.

He hovered his mouse over "Delete Account" and sighed: "I just want peace."

@JamoCA
JamoCA / distrokid-genres.md
Last active June 6, 2026 02:31
Distrokid Genre Reference

DistroKid Genre Reference

Extracted from the DistroKid upload form markup. Genre IDs are the stable value keys submitted by the form. Both dropdowns share the same ID space.

Base Genres

All 43 base genres are available as a Primary genre. The Secondary dropdown offers the same list except Classical and Soundtrack, which are primary-only.

@JamoCA
JamoCA / markdownTableToQuery.cfm
Last active April 20, 2026 18:22
markdownTableToQuery UDF - Converts a markdown table string to a ColdFusion query with VARCHAR columns.
<cfscript>
/**
* Converts a markdown table string to a ColdFusion query with VARCHAR columns.
* James Moberg - 2026-04-17 myCFML.com / SunStarMedia.com
* https://gist.github.com/JamoCA/4bc3d41106b1da4f8511020985ecd350
* @markdown The markdown table string to parse.
* @return A query object with columns derived from the table header.
*/
public query function markdownTableToQuery(required string markdown) hint="Converts a markdown table to a CF query with VARCHAR columns" {
// Local closure: parses a single markdown row into an array of trimmed cells.
@JamoCA
JamoCA / queryReorder.cfm
Last active December 11, 2025 16:31
CFML UDF to reorders query rows based on an explicit list of ID values - ColdFusion / Lucee
<cfscript>
/**
* Reorders query rows based on an explicit list of ID values
* Uses a temporary sort column and Query-of-Queries for reordering
* 2025-12-05
* v1
* James Moberg - MyCFML.com https://www.myCFML.com/
* Sponsored by https://www.SunStarMedia.com/
* https://gist.github.com/JamoCA/4aba2a516a3d84a48255c3401d76b29f
* @param queryData The query to reorder
@JamoCA
JamoCA / TestCustomTag.cfm
Last active November 10, 2025 19:21
Call this as a custom tag using a CFTag or cfscript
<!---
11/10/2025 11:17:33
Custom Tag "thisTag" scope test.
Call this as a custom tag using a CFTag or cfscript
<cf_TestCustomTag>
or
cf_TestCustomTag();
--->
@JamoCA
JamoCA / Integer_Increment.cfm
Last active October 29, 2025 23:46
Integer increment test for Adobe ColdFusion, Lucee and BoxLang.
<cfscript>
// How do CFML platforms increase an integer? Is datatype/class faithfully retained?
// 2025-10-24 (Updated 2025-10-29 with more tests)
// by James Moberg - www.myCFML.com
// NOTE: Test this on TryCF.com (CFFiddle doesn't allow the use of getMetaData.)
test = [
"platform": (server.keyexists("boxlang")) ? "BoxLang" : server.coldfusion.productname,
x: javacast("int", 0)
];