Skip to content

Instantly share code, notes, and snippets.

View jgphilpott's full-sized avatar
⚒️

Jacob Philpott jgphilpott

⚒️
View GitHub Profile
@jgphilpott
jgphilpott / mass.coffee
Last active May 19, 2023 12:47
A collection of functions for converting between different units of mass.
### Mass Conversions ###
convertMass =
nanogram: {}
microgram: {}
milligram: {}
centigram: {}
decigram: {}
gram: {}
@jgphilpott
jgphilpott / FUNDING.yml
Last active May 16, 2023 16:55
A list of GitHub supported funding platforms.
# These are the supported funding platforms:
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
@jgphilpott
jgphilpott / abbreviations.coffee
Last active May 22, 2023 13:51
A reference object for unit name abbreviations.
abbreviations =
angle:
degree: "°"
gradian: "ᵍ"
milliradian: "mrad"
radian: "rad"
arcSecond: "″"
arcMinute: "′"
@jgphilpott
jgphilpott / faviconScheme.coffee
Last active September 25, 2023 11:36
Code to change favicons depending on a users scheme preference.
# Credit: https://stackoverflow.com/a/55252008/1544937
lightSchemeIcon = document.querySelector "link#light-scheme-icon"
darkSchemeIcon = document.querySelector "link#dark-scheme-icon"
schemeMatcher = window.matchMedia "(prefers-color-scheme: light)"
schemeUpdate = ->
if schemeMatcher.matches
@jgphilpott
jgphilpott / illumination.coffee
Last active May 17, 2023 18:05
A collection of functions for converting between different units of illumination.
### Illumination Conversions ###
convertIllumination =
phot: {}
lux: {}
nox: {}
flame: {}
### Phot Conversions ###
@jgphilpott
jgphilpott / density.coffee
Last active May 18, 2023 14:38
A collection of functions for converting between different units of density.
### Density Conversions ###
convertDensity =
gramCentimeterCu: {}
gramMeterCu: {}
kilogramCentimeterCu: {}
kilogramMeterCu: {}
ounceInchCu: {}
@jgphilpott
jgphilpott / magnetomotive.coffee
Created May 19, 2023 10:34
A collection of functions for converting between different units of magnetomotive.
### Magnetomotive Conversions ###
convertMagnetomotive =
milliampere: {}
ampere: {}
abampere: {}
kiloampere: {}
gilbert: {}
@jgphilpott
jgphilpott / radiation.coffee
Last active May 25, 2023 04:30
A collection of functions for converting between different units of radiation.
### Radiation Conversions ###
convertRadiation =
nanogray: {}
microgray: {}
milligray: {}
centigray: {}
decigray: {}
gray: {}
@jgphilpott
jgphilpott / jQueryPlus.coffee
Last active October 14, 2024 07:10 — forked from ncr/README
A collection of jQuery method updates.
# Credit: http://gist.github.com/399624
# The click event will be fired with a small delay but will not fire upon a double click.
$.fn.clickSingleDouble = (singleClickCallback, doubleClickCallback, delay = 250) ->
return this.each =>
clicks = 0
$(this).click (event) =>
@jgphilpott
jgphilpott / LodashPlus.coffee
Last active October 14, 2024 07:11
A collection of Lodash method updates.
_.isVoid = (variable) ->
return _.isUndefined(variable) or _.isNull(variable)
_.isTruthy = (variable) ->
return Boolean(variable) is true
_.isFalsey = (variable) ->