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 / _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 / wp-rss2-image-enclosure.php
Last active January 12, 2024 16:28 — forked from supermethod/Wordpress RSS 2.0 image enclosure
WP RSS 2.0 Image Enclosure with File Size
<?php
/**
* Wordpress RSS Image Enclosure
*
* Wrap ONLY the featured image inside 'enclosure' tags.
*
* @author Davey Jacobson
* @link https://www.daveyjake.dev
*
* @package DJ_Dev
@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 / empty.js
Last active February 20, 2023 19:24
PHP-like `empty` Function in Vanilla JS
/**
* Like PHP's {@link https://www.php.net/manual/en/function.empty.php `empty`} function in vanilla JavaScript.
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
* @since 1.0.0
* @since 1.0.1 Gist made public.
*
* @param {array|bool|number|object|string} value The value to check.
* @param {bool} [strict=false] Enable strict checking. Accepts true, false.
*
@DaveyJake
DaveyJake / _.empty.js
Last active February 20, 2023 19:19
PHP `empty` Function Using Lodash
/**
* Lodash version of PHP's `empty` function.
*
* @author Davey Jacobson <daveyjake21 [at] geemail [dot] com>
* @since 1.0.0 Initial private gist.
* @since 1.1.0 Gist made public.
* @since 1.1.1 Additional checks for 'null' and 'undefined' as strings.
* @since 1.1.2 Additional check for `NaN` and 'NaN' as a string.
*
* @param {array|bool|number|object|string} $value The value to check.
@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",