Skip to content

Instantly share code, notes, and snippets.

View mathetos's full-sized avatar
💭
Working on @impress-org Stuff

Matt Cromwell mathetos

💭
Working on @impress-org Stuff
View GitHub Profile
@mathetos
mathetos / zap.js
Last active February 15, 2018 02:45 — forked from kevinwhoffman/zap.js
Get Unassigned from HelpScout
/*
* HelpScout Zap: Get Number of Unassigned in a Specific Mailbox
* Use Zapier's "Code" Action to trigger this
* This only works with Zapier, it depends on the "callback" functions
*/
var btoa = function (str) {return new Buffer(str).toString('base64');};
fetch('https://api.helpscout.net/v1/mailboxes/{HELPSCOUT_MAILBOX_ID}/folders.json', {
cache: 'no-cache',
@mathetos
mathetos / editor-styles-from-customizer.php
Created July 14, 2016 06:15 — forked from kevinwhoffman/editor-styles-from-customizer.php
Build editor stylesheet from customizer settings
<?php
// Place in functions.php of Twenty Sixteen to see editor background take on color of customizer background.
/**
* Build editor stylesheet from customizer settings upon customizer save.
*/
function kwh_build_stylesheet() {
$upload_dir = wp_upload_dir();
$stylesheet = $upload_dir['basedir'] . '/kwh-editor-style.css';
$styles = '';
@mathetos
mathetos / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* Optimize WooCommerce Scripts
* Updated for WooCommerce 2.0+
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag