Skip to content

Instantly share code, notes, and snippets.

🐝

Matt Sanders mattsandersuk

🐝
Block or report user

Report or block mattsandersuk

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
@mattsandersuk
mattsandersuk / .deployconfig
Last active May 2, 2020
Super Simple, Customisable Deployment Script
View .deployconfig
DEST='host:path'
View split-postcode-padded.php
<?php
/**
* Split a postcode
* @param string $postcode
* @return array containing both outer and inner postcodes
*/
function split_postcode($postcode)
{
// remove spaces to be safe
View countup-script.js
$( '.stat-counter' ).each(function() {
/**
*
* Get Vars from Data Attributes
*
*/
var numFrom = $(this).data('from'); // starting no.
var numTo = $(this).data('to'); // end no.
View screaming-frog-exclude-patterns-magento.txt
.*form_key.*
.*media/catalog.*
.*product_compare.*
.*media/wysiwyg.*
.*skin/frontend.*
.*wishlist/index.*
.*?p=.*
@mattsandersuk
mattsandersuk / webpack.mix.js
Created Feb 1, 2018
Modified webpack config for Laravel Mix + Foundation.js compatibility
View webpack.mix.js
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
@mattsandersuk
mattsandersuk / sendToMailchimp.php
Created Dec 6, 2017
Send form data to mailchimp Raw
View sendToMailchimp.php
<?php
// ==========================================================================
// Mailchimp
// ==========================================================================
//
// Send user to mailchimp
// --------------------------------------------------------------------------
public function sendToMailchimp(Request $request)
{
// customer info
View ASDjJLIuEXT8YJo3zaBsJ4W67SZn_Pyc3q5-rR-KU_UVjQo
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEg4ySyLhF0/GCaN82gbCeFuu0mZ/z8nN6ufq0filP1FY0Kp3BheWxvYWTFAvV7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTIwZTMyNGIyMmUxMTc0ZmM2MDlhMzdjZGEwNmMyNzg1YmFlZDI2NjdmY2ZjOWNkZWFlN2VhZDFmOGE1M2Y1MTU4ZDBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwZTMyNGIyMmUxMTc0ZmM2MDlhMzdjZGEwNmMyNzg1YmFlZDI2NjdmY2ZjOWNkZWFlN2VhZDFmOGE1M2Y1MTU4ZDBhIiwidWlkIjoiOWZhNTQxODgxYWQwNWFhNDQ0ZGMxYzlhZjlhZDNhMTkiLCJ1c2VybmFtZSI6Im1hdHRzYW5kZXJzIn0sInNlcnZpY2UiOnsibmFtZSI6ImdpdGh1YiIsInVzZXJuYW1lIjoibWF0dHNhbmRlcnN1ayJ9LCJ0eXBlIjoid2ViX3NlcnZpY2VfYmluZGluZyIsInZlcnNpb24iOjF9LCJjbGllbnQiOnsibmFtZSI6ImtleWJhc2UuaW8gZ28gY2xpZW50IiwidmVyc2lvbiI6IjEuMC4yMCJ9LCJjdGltZSI6MTQ5MDY0MTA2MCwiZXhwaXJlX2luIjo1MDQ1NzYwMDAsIm1lcmtsZV9yb290Ijp7ImN0aW1lIjoxNDkwNjQwNDk3LCJoYXNoIjoiOTI3ZWU1YmY0ZDRmMWZjN2NiYzE1MjIxZWIzZDhhY2Y2ZmVhYjIwOTU5MzVkOGM2ZTMyMjVlMmJkZjQ0NjIyYjg2YjIwNTdhZTQxNDMxYTg5ZTgxMWU1YThiZDU2NTNlNGNkMzdlNDhiNjAzZWJkNDM3ZTM5MDFlYjhiMmY3NmMiLCJzZXFubyI6OTgwODU0fSwicHJldiI6ImVlYTQwNzdmNWJjM2FjNDBmZjk4MWY1Mjkw
View MPD Playlists
Copy Soundcloud URLs - https://hydrogenaud.io/index.php/topic,91538.0.html | https://dl.dropboxusercontent.com/u/30782742/scrap/scrap.html
@mattsandersuk
mattsandersuk / js-bookmarklet-google-numberer.js
Created Mar 7, 2016
Google Search Result Numberer Bookmarklet
View js-bookmarklet-google-numberer.js
/**
*
* Google Search Result Numberererer
*
*/
// javascript:var%20elements%20=%20document.querySelectorAll(%27%23search%20div.g%27);var%20resultCount%20=%201;Array.prototype.forEach.call(elements%2C%20function(el%2C%20i){console.log(this);el.insertAdjacentHTML(%27beforebegin%27%2C%20%27%3Cspan%20style=%22color%3A%20red;%20font-size%3A%201.5em;%22%3EResult%20%23%27%20%2B%20resultCount%20%2B%20%27%3C/span%3E%27);resultCount%20%2B=%201;});
var elements = document.querySelectorAll('#search div.g');
var resultCount = 1;
View 503.php
<?php
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Retry-After: Sat, 8 Oct 2011 18:27:00 GMT'); //How long before you estimate your website will be back.
?>
<!DOCTYPE HTML>
<html>
<head>
You can’t perform that action at this time.