Skip to content

Instantly share code, notes, and snippets.

View RavenHursT's full-sized avatar
💭
Currently Job Searching. Please reach out if you might have something!

Matthew Marcus RavenHursT

💭
Currently Job Searching. Please reach out if you might have something!
View GitHub Profile
@RavenHursT
RavenHursT / f350-cruise-control.md
Last active July 15, 2026 15:07
Comprehensive Diagnostic Analysis of Cruise Control Deactivation Anomalies in 1996 Ford F-350 7.3L Powerstroke Platforms

Comprehensive Diagnostic Analysis of Cruise Control Deactivation Anomalies in 1996 Ford F-350 7.3L Powerstroke Platforms

Executive Summary

The 1996 Ford F-350, equipped with the 7.3L Powerstroke turbocharged diesel engine, Single Rear Wheel (SRW) configuration, crew cab, and the Electronic 4-Speed Overdrive (E4OD) automatic transmission, represents a pinnacle of mid-1990s heavy-duty truck engineering. Widely referred to as part of the "Old Body Style" (OBS) generation, this platform relies on an electrical architecture that sits at the transitional boundary between strictly analog, vacuum-operated systems and modern, fully networked digital multiplexing. While the powertrain itself is legendary for its mechanical durability, the aging electrical infrastructure is highly susceptible to localized degradation. A particularly perplexing and widely documented anomaly on this specific platform involves the cruise control (speed control) system spontaneously disengaging under two seemingly unrelated

@RavenHursT
RavenHursT / maxAnagrams.ts
Created January 22, 2024 15:54
Compare and find anagrams in an array of strings
const wordsAreAnagrams = (a: string, b: string) =>
a.split("").sort().join("") === b.split("").sort().join("")
const findAnagram = (word: string, compareList: string[]) => {
let result = null
compareList.every((w: string) => {
if (wordsAreAnagrams(word, w)) {
result = w
return false
}
@RavenHursT
RavenHursT / arraySample.util.ts
Created November 5, 2022 06:49
arraySample: An TS/JS array util when you want an evenly distributed sample of values from an array
const arraySample = (array: any[], targetSampleLength: number): any[] => {
const currentLength = array.length
if (currentLength <= targetSampleLength) {
return array
}
const lastIndex = array.length - 1
const increment = Math.ceil(currentLength / targetSampleLength)
let newArray = []
@RavenHursT
RavenHursT / array-mutation-utils.ts
Created August 23, 2022 08:23
Array mutation utility methods
export const replaceItemInList = (
item: unknown,
list: unknown[],
index: number
) => [
...list.slice(0, index),
item,
...list.slice(index + 1)
]
@RavenHursT
RavenHursT / react.memo.function-props.md
Created April 29, 2022 05:34
Using React.memo w/ function props from a HOC

I've created a very simple example here..

https://codesandbox.io/s/react-memo-with-function-props-09fgyo

As you can see, ComponentB renders just as many times as ComponentB.. even though it's wrapped in memo and isn't receiving counter as a prop.

If you open up the app in it's own page (https://09fgyo.csb.app/) and then use React DevTools to profile the page, you'll see that it's reporting it's cause for rendering is because the onClick prop changes:

image

@RavenHursT
RavenHursT / proposed_currency_fields_format.json
Created May 1, 2021 20:12
Proposed currency fields format
{
"value": 20.50,
"currency": "USD"
}
@RavenHursT
RavenHursT / proposed_vet_status_property.json
Last active May 3, 2021 17:30
Proposed vet_status techProfile property
{"status": true, "dd214_url": "https://url.to.cloud.storage/item/id"}
@RavenHursT
RavenHursT / proposed_working_hours_property.json
Last active May 1, 2021 20:09
Proposed Working Hours Property
// Each index in the array corrisponds to a day of the week.
// Let the consumer of the API decide what each day should be labelled as, based on their L18N/I18N implementation.
// Z-07:00:00 is EST. Z-offset should be set by the client to reflect the TZ of the user that set the value.
{
"working_hours": [
["09:00:00Z-07:00:00", "17:00:00Z-07:00:00"],
["09:00:00Z-07:00:00", "17:00:00Z-07:00:00"],
["09:00:00Z-07:00:00", "17:00:00Z-07:00:00"],
["09:00:00Z-07:00:00", "17:00:00Z-07:00:00"],
["09:00:00Z-07:00:00", "15:00:00Z-07:00:00"],
function flatten(source, k, keyPath = [], result = {}) {
if(typeof source !== `object` || source === null) {
result[keyPath.join('.')] = source
return result
}
let iterationResult
for (k in source) {
keyPath.push(k)
iterationResult = flatten(source[k], k, keyPath, result)
@RavenHursT
RavenHursT / fpkill.sh
Created July 13, 2018 15:30
OSX Bash function/alias To Find a Process Listening on a Port and Kill It.
fpkill() {
lsof -i tcp:$1 | awk 'NR!=1 {print $2}' | xargs kill -9
}