git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/bin/bash | |
# CONF | |
DBG=true | |
[email protected] | |
RELOG_PASSW=xxxxxxxxxxxxxxx | |
# END CONF |
#!/usr/bin/env babel-node | |
require('dotenv').config() | |
import contentful from 'contentful' | |
import fs from 'fs-extra-promise' | |
// Contentful Config | |
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN | |
const spaceId = process.env.CONTENTFUL_SPACE_ID | |
const client = contentful.createClient({ accessToken: apiToken, space: spaceId }) |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
const chalk = require('chalk') | |
const fs = require('fs-extra') | |
const sharp = require('sharp') | |
const globby = require('globby') | |
/** | |
* Where to get dem piccies. | |
*/ | |
const SITE_PATHS = [ | |
`web/app/uploads/**/*.jpg`, |
<?php | |
namespace App\Providers; | |
use Roots\Acorn\ServiceProvider; | |
class ThemeServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. |
This is an attempt to describe how to pass data to Gutenberg InnerBlocks when using ACF and ACF Composer. I can not share complete code examples ATM since due to reasons that I can not affect.
We will be using Gutenbergs Context. It is not 100% straight forward or easy to explain but in short, a block can provide context to its inner blocks and use context that is passed down to it.
Disclaimer: I am writing this while focusing on other things so please forgive (and tell) me if anything is unclear. It probably helps if you have some deeper understanding of how ACF and ACF Composer works.
In order to do this you need to use ACF 6 which is in alpha 2 at the time of writing this.
ACF composer needs to be updated with the changes in [this commit](https://github.com/Log1x/acf-composer/c