Skip to content

Instantly share code, notes, and snippets.

Black Lives Matter

Andrew Patton acusti

Black Lives Matter
View GitHub Profile
acusti / log.txt
Last active Nov 30, 2018
CSG flow errors
View log.txt
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/brandcast-next/shared/api/api-crud.js:40:92
Cannot get edge.node because property node is missing in mixed [1].
37│ stringOf(get(result, ['data', fieldName, 'pageInfo', 'endCursor']));
39│ const getResults = (result, fieldName: string) =>
40│ arrayOf(get(result, ['data', fieldName, 'edges'])).map((edge) => objectOf(edge && edge.node));
View condense-meeting-times.js
// Take an array of meeting time ranges and return an array of condensed 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 /
Last active Jul 9, 2021
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.
# Install WordPress
# =================
# Based on many sources, but originally based on:
# @
# See also:
# BEGIN Configuration
View CodePen-→-WebPageTest.markdown

CodePen → WebPageTest

Building a script to overlay some options, then send current pen’s debug URL to WebPageTest.


  • Rename .key to something else so React doesn't complain
  • Validate form fields on submit
  • Add Close button to overlay form
  • Add UI to help users determine how to enter location and understand options
  • If possible, add option to specify multiple locations
acusti / Towards-a-more-perfect-link-underline.markdown
Last active Aug 29, 2015
Towards a more perfect link underline
View Towards-a-more-perfect-link-underline.markdown
acusti / Buttons-hover-effect.markdown
Last active Aug 29, 2015
A Pen by Andrew Patton.
View Buttons-hover-effect.markdown
View Video.js-disposal-in-overlay-box.markdown

Video.js disposal in overlay box

Reduced test case for creating and disposing of video.js players in a (colorbox) overlay box.

A Pen by Andrew Patton on CodePen.


acusti / google-analytics.js
Last active Nov 7, 2017 — forked from ismyrnow/google-analytics-amd.js
Barebones google analytics RequireJS module wrapper for “universal analytics” with example of how to use it within a single page application
View google-analytics.js
* Google analytics include (using "Universal Analytics")
/*global define */
define(function(require) {
'use strict';
acusti / blackbox.js
Last active Dec 30, 2015
JS file for the Blackbox Debug Bar WordPress plugin (
View blackbox.js
var WpDebugBar = {
element: ['globals', 'profiler', 'database', 'errors'],
open: null,
switchPanel: function(open) {
View Animate-scroll-with-CSS3-transition-(with-jQuery).markdown

Animate scroll with CSS3 transition (with jQuery)

Same as the sans jQuery version from which it was forked but with jQuery.

A Pen by Andrew Patton on CodePen.