This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
/* stringHashCode UDF: Returns a consistent string hashCode 32bit integer regardless of how Java may have hashCode() configured | |
2025-02-01 | |
Author: James Moberg http://sunstarmedia.com @sunstarmedia | |
GIST: https://gist.github.com/JamoCA/111cb4ef9855c1bdbfc4a8409b1d8db9 | |
Blog: https://dev.to/gamesover/java-hashcode-identity-crisis-307a | |
X/Twitter: https://x.com/gamesover/status/1886495587320901725 | |
LinkedIn: https://www.linkedin.com/posts/jamesmoberg_coldfusion-activity-7292261743089590274-HTPA | |
*/ | |
numeric function stringHashCode(inputString) hint="Returns a consistent 32bit integer regardless of how Java may have hashCode() configured" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotkey hotstring: auto-replace "hack" terms with friendlier random phrase | |
; 2025-01-23 | |
; Author: James Moberg http://sunstarmedia.com @sunstarmedia | |
; GIST: https://gist.github.com/JamoCA/d5d7a1b6098f7582e2c22c4d357b3650 | |
; TWEET: https://x.com/gamesover/status/1882495718809853997 | |
; This hotstring will use a random phrase whenever a "poorly chosen hack-related word" is typed, followed by a space or punctuation; text case is not preserved. (2025-01-23) | |
::hack:: | |
::bypass:: | |
::glitch:: | |
::trick:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- city-state-zip-mssql-cte-join-example.sql (Cross-database query example to join data from a different MSSQL database containing ZIP data using a CTE) | |
-- 2025-01-22 | |
-- Author: James Moberg http://sunstarmedia.com @sunstarmedia | |
-- GIST: https://gist.github.com/JamoCA/f082d8ca1b42f4d5474edf5e367a4df1 | |
-- TWEET: https://x.com/gamesover/status/1882125235996254489 | |
-- Using MSSQL with "U.S. ZIP Code Database (5 Digit)" data from https://www.zip-codes.com/zip-code-database.asp | |
-- NOTE: Some ZIPs may be assigned to one-or-more cities. For this use, only the primary (P) city record is returned. | |
WITH ZipCTE AS ( | |
SELECT ZipCode, CityAliasMixedCase AS City, State, TimeZone, TimeZoneOffset, DayLightSaving, Latitude, Longitude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// https://www.bennadel.com/blog/4748-strange-implicitarrystructvar-behavior-in-coldfusion.htm | |
// 2025-01-06 This syntax appears to work. | |
arrayNew( 1 ) | |
// Create a collection that is large(ish). | |
.resize( 1000 ) | |
.set( 1, 1000, 1 ) | |
// Iterate over the collection using PARALLEL THREADS. | |
.each(function(){ | |
local.value = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public string function makeLastModifiedDate(date date=now(), boolean isLocal=true) hint="Generates an RFC9110 8.8.2 compliant Last_Modified date string for use in an HTTP header" { | |
local.d = (arguments.isLocal) ? dateConvert('local2Utc',now()) : arguments.date; | |
return datetimeformat(local.d, "ddd, d mmm yyyy hh:nn:ss") & " GMT"; | |
} | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
𝐂𝐚𝐥𝐥𝐞 𝐁𝐥𝐚𝐧𝐜𝐨𝐬, 𝐂𝐨𝐬𝐭𝐚 𝐑𝐢𝐜𝐚 | |
𝕮𝖆𝖑𝖑𝖊 𝕭𝖑𝖆𝖓𝖈𝖔𝖘 | |
辻󠄁直𣘺 | |
E�l�e�c�t�r�o�n�i�c | |
readme ∕ .txt | |
I like 🍕 | |
cámara | |
caméra | |
愛忍和 | |
1300395 陆小姐,你好!现在方便接电话吗 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service_id":"%{req.service_id}V", | |
"service_version":"%{fastly_info.version}V", | |
"time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t", | |
"time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t", | |
"time_elapsed":%{time.elapsed.usec}V, | |
"client_ip":"%{req.http.Fastly-Client-IP}V", | |
"request":"%{req.request}V", | |
"protocol":"%{req.proto}V", | |
"host":"%{req.http.Fastly-Orig-Host}V", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service_id":"%{req.service_id}V", | |
"service_version":"%{fastly_info.version}V", | |
"time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t", | |
"time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t", | |
"time_elapsed":%{time.elapsed.usec}V, | |
"client_ip":"%{req.http.Fastly-Client-IP}V", | |
"request":"%{req.request}V", | |
"protocol":"%{req.proto}V", | |
"host":"%{req.http.Fastly-Orig-Host}V", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
/* sanitizeDash - Converts all Windows-1252 & unicode dashes in a string to a specified character (default=ASCII 45 dash) | |
2024-12-06 | |
Author: James Moberg http://sunstarmedia.com @sunstarmedia | |
GIST: https://gist.github.com/JamoCA/da8d38a409d41fd4b7abccd782124775 | |
*/ | |
string function sanitizeDash(inputString="", numeric dashAscii=45) hint="I normalize all Windows-1252 & unicode dashes in a string to a specified character" { | |
return javacast("string", arguments.inputString).replaceAll("#chr(45)#|#chr(150)#|#chr(151)#|#chr(173)#|#chr(8208)#|#chr(8209)#|#chr(8210)#|#chr(8211)#|#chr(8212)#|#chr(8213)#|#chr(8722)#|#chr(11799)#|#chr(11834)#|#chr(11835)#|#chr(65112)#|#chr(65123)#", chr(arguments.dashAscii)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
/* isIpInCIDRRange (Determine if the given address range contains the given IP address. Supports IPv4 & IPv6.) | |
2024-12-05 | |
Requires IPAddress java library from https://github.com/seancfoley/IPAddress | |
Author: James Moberg http://sunstarmedia.com @sunstarmedia | |
GIST: https://gist.github.com/JamoCA/6cee1fae80e25a83be13a840621d1b9d | |
Blog: https://dev.to/gamesover/testing-if-ip-is-within-a-cidr-range-29jb | |
X/Twitter: https://x.com/gamesover/status/1864714591646945491 | |
LinkedIn: https://www.linkedin.com/posts/jamesmoberg_heres-how-we-are-testing-if-an-ip-address-activity-7270480668407537665-XUlP |
NewerOlder