Skip to content

Instantly share code, notes, and snippets.

View KempfCreative's full-sized avatar
🌭
I am a meat popsicle

Jonathan Kempf KempfCreative

🌭
I am a meat popsicle
View GitHub Profile
@KempfCreative
KempfCreative / FacebookMarketplaceItems
Created March 27, 2020 14:52
Query for FB Marketplace items
Array.from(document.getElementsByTagName('a')).filter((anchor) => {
let uri;
try {
uri = new URL(anchor.href);
} catch(e) {
return null;
}
return /^\/marketplace\/item/.test(uri.pathname);
})
@KempfCreative
KempfCreative / strapiModel
Created June 27, 2019 17:47
Strapi model properties
super_
extend
extended
__super__
NotFoundError
NoRowsUpdatedError
NoRowsDeletedError
forge
collection
count
@KempfCreative
KempfCreative / ctx methods and properties
Last active November 8, 2023 08:30
Strapi ctx internals
request
response
app
req
res
originalUrl
state
_i18n
matched
router
@KempfCreative
KempfCreative / keybase.md
Created February 19, 2019 13:46
Verifying Myself on keybase.io

Keybase proof

I hereby claim:

  • I am KempfCreative on github.
  • I am kempfjj (https://keybase.io/kempfjj) on keybase.
  • I have a public key whose fingerprint is 9FE8 1F2C 978D 39E3 9E97 918D 19CA 2995 3067 2BB0

To claim this, I am signing this object:

@KempfCreative
KempfCreative / Mega Menu Tabs
Created October 19, 2013 22:56
This is a module used in a larger JS file that adds classes to the selected navigation tab.
tabs: function (element, hover) {
var scope = element,
$contentTabs = $jQ(scope + ' > .tab-content > .tab'),
activeClass = 'active';
$jQ(scope + ' > .tab-menu > .tab').each(function (i, el) {
$jQ(this).add($contentTabs[i]).attr('tab', i + 1);
});
$jQ(scope + ' > .tab-menu > .tab').on((hover ? 'mouseenter' : 'click'), function (e) {