Skip to content

Instantly share code, notes, and snippets.

View keenanpayne's full-sized avatar

Keenan Payne keenanpayne

View GitHub Profile
@keenanpayne
keenanpayne / pardot-error.js
Created February 9, 2021 05:41
Pardot does not accept Ajax requests, it will produce a CORS error. Instead, use JSONP to submit the data, set your
// Set this as the "Error Location" for the Pardot form handler
logResult({ 'result' : 'error' });
@keenanpayne
keenanpayne / .eleventy.js
Created December 2, 2020 22:38
Convert number (integer) to words (string) in Eleventy
// Reference this utility wherever it lives
const inWords = require('./src/_utils/in-words.js');
// Add the filter to your Eleventy config
module.exports = function(config) {
// Filter to convert numbers to words
config.addFilter("inWords", function(value) {
return inWords(value);
});
};
@keenanpayne
keenanpayne / a11y-hidden.scss
Created June 23, 2020 23:21
Snippet to accessibly hide content (reference: https://webaim.org/techniques/css/invisiblecontent/)
//
// Mixin for convenience
// ---------------------
@mixin a11y-hidden() {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
@keenanpayne
keenanpayne / git-fuzzy-alias
Created June 10, 2020 04:17
Simple aliases for git-fuzzy that you can put in your terminal profile (e.g., `.bash_profile, `.zshrc`)
# Git Fuzzy
alias gfb="git fuzzy branch"
alias gfs="git fuzzy status"
alias gfl="git fuzzy log"
alias gfr="git fuzzy reflog"
alias gfd="git fuzzy diff"
alias gfp="git fuzzy pr"
@keenanpayne
keenanpayne / spacing.scss
Created May 4, 2020 17:04
Simple spacing with Sass functions
//
// Functions
// ==================================================
//
// @function spacing()
//
// This is a helper spacing function used for creating consistent spacing
// increments that can be used throughout the website
//
{"lastUpload":"2021-01-26T23:27:48.999Z","extensionVersion":"v3.4.3"}
@keenanpayne
keenanpayne / .bash_profile
Last active July 1, 2021 01:24
Aliases for developer convenience. Inspired by: https://github.com/ireade/dotfiles
################################################################################
# ALIASES & PATHS
################################################################################
# Git
alias gi="git init && gac 'Initial commit'"
alias gs="git status"
alias gd="git diff"
alias glog='git log --graph --all --decorate'
@keenanpayne
keenanpayne / hyper.js
Last active April 2, 2020 22:17
Hyper Terminal Settings (https://hyper.is/)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@keenanpayne
keenanpayne / node_setup.sh
Last active March 30, 2016 17:36
Node and NPM setup on any Linux machine
#!/bin/bash
#
# This script is used to upgrade our Node.js and NPM instances on our servers
##
# CONSTANTS
##
NODE_VER="v5.9.1"
NPM_VER="v3.7.3"
@keenanpayne
keenanpayne / colors.scss
Last active October 23, 2015 18:56
Managing color palettes in SASS
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
//
// Colors Map
//
$colors: (
blue: (