Skip to content

Instantly share code, notes, and snippets.

View joebillings's full-sized avatar

Joe Billings joebillings

View GitHub Profile
@joebillings
joebillings / .gitignore
Created November 27, 2019 10:40
One .gitignore
# Ignore everything #
**
!wp-content/
wp-content/**
!wp-content/themes/
!wp-content/plugins/
wp-content/themes/**
wp-content/plugins/**
# Add two rules for each Theme or Plugin you want to include:
@joebillings
joebillings / Javascript ISO country code to country name conversion
Created July 16, 2019 14:19 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@joebillings
joebillings / dialog.html
Created June 4, 2019 15:33 — forked from coinsandsteeldev/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<!DOCTYPE html>
<html>
<head>
<script>
var data
var formId = 'form'
function drawForm() {
if (!data) return
var outputEl = document.getElementById(formId);
javascript:(function() {
var d = document,
w = window,
sw = function() { return Math.max(d.documentElement.clientWidth, w.innerWidth) },
i = d.createElement("div"),
s = "position:fixed;top:0;right:0;padding:4px 6px;z-index:999999;opacity:.8;background:#000;color:#fff;font:15px HelveticaNeue";
i.setAttribute("style", s);
i.innerHTML = sw() + "px";
var path = "";
// if external stylesheets are on we need to know if the sheets are in a directory so we can set the path correctly
if(fwDocument.fwExternalStylesheets)
{
var links = fwDocument.fwTags.fwFindAll("link");
for(var i = 0; i < links.length; i++)
{
if(/^"?css\//.test(links[i].href.toString())) //"
{
<action-encoding>UTF-8</action-encoding>
<library-action name="style_accessors">
<action-version version="1.2.7">
Style Accessors
Get and set styles on any element, regardless where they were initially defined.
MIT License
Copyright (c) 2013 Walter Lee Davis
</action-version>