Skip to content

Instantly share code, notes, and snippets.

View jack-pallot's full-sized avatar

Jack Pallot jack-pallot

View GitHub Profile
@jack-pallot
jack-pallot / twitter-parse-links.js
Last active September 23, 2015 15:17
Creates hyperlinks for elements returned from the Twitter API in plain text.
// call function
$(document).ready(function() {
var twitterFeed = TWITTER_PARSE_LINKS("#js-twitterFeed");
});
@jack-pallot
jack-pallot / checkbrowsersupport.js
Last active September 30, 2015 15:04
Check Browser Support
var checkSupport = function checkSupport(el) {
if (!(el in document.documentElement.style)) {
document.body.className+= ' NoSupport-' + el;
};
};
var test = checkSupport('backgroundSize');
/*
OPTIONS
<?php
/**
* credit: https://github.com/humanmade/hm-core/blob/master/hm-core.functions.php#L1236
* Like get_template_part() put lets you pass args to the template file
* Args are available in the tempalte as $template_args array
* @param string filepart
* @param mixed wp_args style argument list
*/
whitelist: [
'p',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'hr',
'ol',
@jack-pallot
jack-pallot / slater-tailwind-preset.js
Created October 8, 2020 09:57
Slater Tailwind Preset
const ExtractCSS = require('mini-css-extract-plugin')
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
function tailwindPreset({ config, watch }) {
config.module.rules.push({
test: /\.css$/,
exclude: /node_modules/,
use: [
ExtractCSS.loader,
require.resolve('css-loader'),