Skip to content

Instantly share code, notes, and snippets.

View joedooley's full-sized avatar

Joe Dooley joedooley

  • Florida
  • 16:57 (UTC -04:00)
View GitHub Profile
@joedooley
joedooley / index.php
Created May 18, 2020 14:12
Enable CORS hack. Do not use in PROD!!!!
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS');
@joedooley
joedooley / theme.js
Created April 9, 2020 19:23
Some random companies design system...
/**
* * Styled Components Theme *
* This theme file contains an object which holds values for
* common variables such as color, fonts, box shadows, and more.
* Our theme file pulls many of its conventions from styled-system.
*
* * Further Reading:
* - https://primer.style/components/docs/primer-theme
* - https://styled-system.com/table
*/
@joedooley
joedooley / App.js
Created February 17, 2020 21:51 — forked from nvbn/App.js
Hooks with classes
import React from "react";
import Counter from "./Counter";
const App = () => {
return (
<div className="App">
<Counter initialCount={100} />
</div>
);
};
@joedooley
joedooley / Contract Killer 3.md
Created July 14, 2019 18:17 — forked from jesgs/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@joedooley
joedooley / Three Wise Monkeys.md
Created July 14, 2019 18:11 — forked from jesgs/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@joedooley
joedooley / gforms-add-on-framework-example.php
Last active June 14, 2019 15:28
Append a dynamic_field_map field to Gravity Forms payment plugin feed.
<?php
namespace DevDesigns\DevDesignsStripeAchPlaid;
use GFForms;
use GFPaymentAddOn;
use DevDesigns\DevDesignsStripeAchPlaid\Updater\Licensing;
@joedooley
joedooley / SpringRole Verification
Last active June 12, 2019 21:39
Link GitHub account to SpringRole account.
afb8cdd65d760f1453e1b572e004b7d1cbbe154853febb022cda4eb7abf512c4c8f04c2a2edb7d554d0303ace3a375a93dda88c3e7f0cf469f30077f906fb8b6
@joedooley
joedooley / functions.php
Created April 30, 2019 14:45 — forked from tripflex/functions.php
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
<?php
/**
* Make sure the function does not exist before defining it
*/
if( ! function_exists( 'remove_class_filter' ) ){
/**
* Remove Class Filter Without Access to Class Object
*
* In order to use the core WordPress remove_filter() on a filter added with the callback
@joedooley
joedooley / header.js
Created April 18, 2019 14:41
Toggles class and sets dynamic header height on CSS variable. Uses Intersection Observer API to target the site headers next element sibling.
const addMarginTop = () => {
const siteHeader = document.querySelector('.site-header')
const siteHeaderHeight = window.getComputedStyle(siteHeader).getPropertyValue('height')
const siteHeaderSiblingEl = siteHeader.nextElementSibling
if (!siteHeader || !siteHeaderSiblingEl) {
return
}
siteHeaderSiblingEl.style.setProperty(`--header-height`, siteHeaderHeight)
@joedooley
joedooley / mailhog.php
Last active November 7, 2018 18:41
Route all WordPress email through MailHog.
<?php
/**
* Plugin Name: MailHog Config
* Description: Route all WordPress email through MailHog.
* Version: 1.0.0
*
* @package LuminFire\MailHog
* @since 1.0.0
* @author LuminFire
* @link https://luminfire.com/