Skip to content

Instantly share code, notes, and snippets.

Leading design systems at Sprout Social

Chase McCoy chasemccoy

Leading design systems at Sprout Social
Block or report user

Report or block chasemccoy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View remark-seeds-formatting.js
'use strict';
const select = require(`unist-util-select`);
const is = require('unist-util-is');
const modifyChildren = require('unist-util-modify-children');
const parents = require('unist-util-parents');
const visit = require('unist-util-visit')
const findAfter = require('unist-util-find-after')
module.exports = () => markdownAST => {
var wrappedAST = parents(markdownAST);
View zip_arrays.js {
return {
return {
return {
return <TypeSpecimen name="Testing" style={styles}></TypeSpecimen>
chasemccoy / gist:4beaff5561ddbf7a82a7
Created Mar 11, 2015
Change Background Color of CSS Element via Javascript
View gist:4beaff5561ddbf7a82a7
// Add hex colors you want to cycle through in this array
var colors = ['#E25243', '#00aeef', '#22d5e5', '#B8E986', '#F5A623', '#4A90E2', '#7F92A8', '#61C037', '#B370EF', '#ffdc29', '#FF6858'];
// Calculates the index of the array
// Math.random returns a decimal number between 0 and 1
// array.length returns number of items in array
var randomColor = Math.floor((Math.random()) * colors.length);var changeBackground = function() {
// The element that you want to change needs to have a certain ID, which you can change here
document.getElementById("changeColors").style.backgroundColor = colors[randomColor];
You can’t perform that action at this time.