Skip to content

Instantly share code, notes, and snippets.

View DaveyJake's full-sized avatar
🎯
Focusing

Davey Jacobson DaveyJake

🎯
Focusing
View GitHub Profile
@DaveyJake
DaveyJake / yadcf.d.ts
Last active November 5, 2023 02:54
Typed YADCF
// Type definitions for Yet Another DataTables Column Filter 0.94.beta.46
// Project: yadcf
// Definitions by: Davey Jacobson <https://daveyjake.dev>
import DataTables, { type Api, type ColumnIdx as ColumnNumber, type ColumnSelector as ColSelector, type Config } from 'datatables.net';
import 'yadcf';
//
// Column Parameters
//
@DaveyJake
DaveyJake / address-abbreviations.js
Created September 13, 2023 19:23
Common Street and Direction Abbreviations
/**
* Abbreviations for common street names and directions.
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
*/
const addressAbbreviations = {
'Avenue': 'Ave',
'Boulevard': 'Blvd',
'Circle': 'Cir',
'Drive': 'Dr',
@DaveyJake
DaveyJake / php.ts
Last active May 14, 2023 10:49
PHP functions for Typescript
/**
* The following Typescript functions are inspired by {@link https://www.php.net/ PHP}.
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
* @version 1.0.1
*/
import each from 'lodash/each';
import fromPairs from 'lodash/fromPairs';
import includes from 'lodash/includes';
import isEqual from 'lodash/isEqual';
@DaveyJake
DaveyJake / files.ts
Created April 11, 2023 15:52
Utility functions for working with files.
/**
* This file contains utility functions for working with your project files.
*
* @link https://nodejs.dev/en/learn/nodejs-file-paths/
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
* @version 1.0.0
*/
import fs from 'fs';
@DaveyJake
DaveyJake / J.ts
Last active February 24, 2023 20:56
St. Venant Torsional Constant
/**
* St. Venant torsional constant for structural engineering mathematics.
*
* @remarks Symbol: `J`.
*
* @example Taken from page I-57 the 2013 edition of the AISI Manual for Cold-Formed Steel Design - Vol 1.
* const J = new StVenantTorsionalConstant( 9.000, 2.500, 0.773, 0.059, 0.1875 );
* J.value = 0.00102;
*
* @version 1.0.0
@DaveyJake
DaveyJake / settings.json
Created June 15, 2022 22:00
VSCode Homebrew Terminal Color Scheme
{
"workbench.colorCustomizations": {
"terminal.foreground": "#6af549",
"terminal.background": "#000000",
"terminal.ansiBlack": "#000000",
"terminal.ansiBlue": "#0b22b8",
"terminal.ansiCyan": "#4bb0bd",
"terminal.ansiGreen": "#49ad31",
"terminal.ansiMagenta": "#b23bb9",
"terminal.ansiRed": "#9d2713",
@DaveyJake
DaveyJake / array-delete.js
Created June 15, 2022 03:24
[JS] Missing Array Method: Delete
/**
* This method allows developers to easily remove any element
* from any array.
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
*
* @param {mixed} element Any specified element in any array.
*
* @return {array} This array instance without the specified
* element if successful. The original array
@DaveyJake
DaveyJake / _missing-functions.scss
Last active January 25, 2024 23:36
Sass/SCSS Missing Functions
///
// Sass/SCSS missing functions.
//
// @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
//
// @version 1.2.2
//
// @since 1.0.0 - Initial commit.
// @since 1.1.0 - Added str-replace().
// @since 1.1.5 - Added is-list().
@DaveyJake
DaveyJake / framework.css
Last active January 28, 2022 22:45
Framework Generator
.mt--5, .mv--5 {
margin-top: 0.3125rem;
}
.mt---5, .mv---5 {
margin-top: -0.3125rem;
}
.mb--5, .mv--5 {
margin-bottom: 0.3125rem;
@DaveyJake
DaveyJake / local-business-json-ld.js
Last active August 13, 2021 19:08 — forked from bavington/local-business-JSON-LD.js
Forked to improve formatting.
// A simple, single location local business JSON-LD Schema Boilerplate
// By @bavington, available on GitHub: http://bit.ly/Local_JSON
{
"@context": "http://schema.org",
"@type": "Plumber", // Change to the most specific type (List of choices: https://goo.gl/tvMVHf)
"name": "Custom Heat", // *REQUIRED
"legalName": "Custom Heat Ltd", // The Registered Business Name
"vatID": "776796257",
"description": "Established in Rugby since 1980, Custom Heat are a family run central heating and plumbing business serving Rugby, Royal Leamington Spa and Warwick.",
"logo": "http://www.customheat.co.uk/wp-content/themes/custom-heat/images/custom-heat-logo.png",