Skip to content

Instantly share code, notes, and snippets.

View mattradford's full-sized avatar
👋

Matt Radford mattradford

👋
View GitHub Profile
# Contract Killer
### The popular open-source contract for web designers and developers by [Stuff & Nonsense](http://stuffandnonsense.co.uk/)
* Originally published: 23/12/2008
* Revised date: 15/12/2013
* [Original post](http://stuffandnonsense.co.uk/projects/contract-killer/)
* * *

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@mattradford
mattradford / 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
@mattradford
mattradford / flexbox.less
Last active August 29, 2015 14:21 — forked from jayj/flexbox.less
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-moz-@{display}";
@mattradford
mattradford / functions.php
Created December 22, 2016 11:34 — forked from BurlesonBrad/functions.php
Reduce or remove WooCommerce 2.5 minimum password strength requirement for creating a user account. Warning: Use at your own risk.
<?php
/**
*Reduce the strength requirement on the woocommerce password.
*
* Strength Settings
* 3 = Strong (default)
* 2 = Medium
* 1 = Weak
* 0 = Very Weak / Anything
*/
@mattradford
mattradford / ajax-handler-wp.php
Last active October 31, 2017 14:06 — forked from pixeline/ajax-handler-wp.php
Custom ajax handler for Wordpress. Using admin-ajax.php does not allow the use of plugin shortcodes. Using a custom ajax handler like this bypasses that. http://wordpress.stackexchange.com/questions/170808/the-content-shows-shortcode-instead-of-parsing-it
<?php
/*
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes).
credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress
*/
//mimic the actual admin-ajax
define('DOING_AJAX', true);
if (!isset( $_REQUEST['action']))
die('-1');
@mattradford
mattradford / wp-install.sh
Last active October 23, 2018 10:21 — forked from hanigamal/wp-install.sh
WordPress Commandline Local Install
#!/bin/bash
#
# WP Commandline Local Install, by Brian Richards (@rzen)
#
# Creates a new directory, downloads WordPress, creates a database, sets up wp-config,
# optionally empties wp-content, and deletes other misc files. This compliments my local
# dev setup, outlined here: http://rzen.net/development/local-develoment-in-osx/
#
# Credit:
# Based on WPBuildr (https://github.com/AaronHolbrook/wpbuildr/). Props to Aaron Holbrook
<?php
function pewc_get_multicurrency_price( $price ) {
// Compatibility with WooCommerce multilingual
$price = apply_filters( 'wcml_raw_price_amount', $price );
if( class_exists('WOOCS') ) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value( floatval( $price ) );
@mattradford
mattradford / exodus-list
Created January 2, 2018 21:04 — forked from anonymous/exodus-list
Trackers from https://reports.exodus-privacy.eu.org/trackers/ for use in DNS blocking
# List of trackers for DNS blocking
# Taken from https://reports.exodus-privacy.eu.org/trackers/ and https://discourse.pi-hole.net/t/trackers/5656
0.0.0.0 a4.tl2
0.0.0.0 accengage.com
0.0.0.0 aatkit.com
0.0.0.0 adswizz.com
0.0.0.0 appboy.com
0.0.0.0 adnxs.com
0.0.0.0 appsflyer.com