Skip to content

Instantly share code, notes, and snippets.

View acusti's full-sized avatar
Black Lives Matter

Andrew Patton acusti

Black Lives Matter
View GitHub Profile
@acusti
acusti / install.sh
Last active May 3, 2022 03:39
WordPress install script using WP-CLI: supports Multisite, MAMP, local php.ini overrides, and theme and plugin scaffolding, and will generate optimized .gitignore and .htaccess files.
#!/bin/bash
# Install WordPress
# =================
# Based on many sources, but originally based on:
# @ http://premium.wpmudev.org/blog/set-up-wordpress-like-a-pro/
# See also: http://wprealm.com/blog/wordpress-wp-cli-kung-fu-made-simple/
# BEGIN Configuration
// Take an array of meeting time ranges and return an array of condensed ranges
// https://www.interviewcake.com/question/merging-ranges
function condense_meeting_times(times) {
let timeline = [];
times.forEach((time) => {
//time[0], time[1]
// time is a tuple witih beginning and end
if (timeline[time[0]] === undefined) {
timeline[time[0]] = time[1];
@acusti
acusti / log.txt
Last active November 30, 2018 15:15
CSG flow errors
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/brandcast-next/shared/api/api-crud.js:40:92
Cannot get edge.node because property node is missing in mixed [1].
node_modules/brandcast-next/shared/api/api-crud.js
37│ stringOf(get(result, ['data', fieldName, 'pageInfo', 'endCursor']));
38│
39│ const getResults = (result, fieldName: string) =>
40│ arrayOf(get(result, ['data', fieldName, 'edges'])).map((edge) => objectOf(edge && edge.node));
41│