Skip to content

Instantly share code, notes, and snippets.

@ggutenberg
ggutenberg / repeatingSum.js
Last active June 11, 2021 19:25
Roll20 RepeatingSum with filterable section IDs
const repeatingSum = (destinations, section, fields, ...extras) => {
const isNumber = (value) =>
parseFloat(value).toString() === value.toString();
const isOption = (value) =>
[...checks.valid, ...checks.roundtypes].includes(value);
const isRounding = (value) => checks.roundtypes.includes(value);
const isFraction = (value) =>
value.includes("/") && !(value.includes(",") || value.includes("|"));
const getTrimmed = (value) => value.toLowerCase().replace(/\s/g, "");
const getRounded = (type, value, pow) =>
@ggutenberg
ggutenberg / PostFromWord.md
Created November 5, 2019 20:27
Creating a WordPress post from a Word document

Creating a WordPress post from a Word document

  1. Import docx using Mammoth

    1. Scroll to bottom of the Edit page
    2. In the Mammoth .docx converter section, select your .docx file
    3. Make sure that Visual is selected, and click Insert into editor
    4. It will appear as though nothing has changed, but click Update anyway

    The contents will now appear as a Text Block at the top of the WPBakery Page Builder, however if you look at the actual page on the site, the formatting is off. In order to fix the formatting:

@ggutenberg
ggutenberg / .bash_profile
Last active September 14, 2015 20:32 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ggutenberg
ggutenberg / states.js
Created July 15, 2015 20:47
States JS Object
var states = {
AL: 'Alabama',
AK: 'Alaska',
AZ: 'Arizona',
AR: 'Arkansas',
CA: 'California',
CO: 'Colorado',
CT: 'Connecticut',
DE: 'Delaware',
FL: 'Florida',