Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
blueprintmrk / edgecache.vcl
Created June 19, 2021 01:35 — forked from matthewjackowski/edgecache.vcl
A basic vcl setup for edge caching
# A basic setup for the edge
# Strips cookies and un-needed params
# Does a few redirects
# Sets forwarded proxy headers
# Custom error page
vcl 4.0;
import std;
# Backend setup
backend default {
@blueprintmrk
blueprintmrk / wordpress.vcl
Created June 19, 2021 01:32 — forked from quangbahoa/wordpress.vcl
Varnish 4 VCL configuration for WordPress. Also allows purging
# A heavily customized VCL to support WordPress
# Some items of note:
# Supports https
# Supports admin cookies for wp-admin
# Caches everything
# Support for custom error html page
vcl 4.0;
import directors;
import std;
@blueprintmrk
blueprintmrk / wordpress.vcl
Created June 19, 2021 01:31 — forked from Greg-Boggs/wordpress.vcl
Varnish 4 VCL configuration for WordPress. Also allows purging
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
@blueprintmrk
blueprintmrk / wordpress.vcl
Created June 19, 2021 01:29 — forked from matthewjackowski/wordpress.vcl
Varnish 4 VCL configuration for WordPress. Also allows purging
# A heavily customized VCL to support WordPress
# Some items of note:
# Supports https
# Supports admin cookies for wp-admin
# Caches everything
# Support for custom error html page
vcl 4.0;
import directors;
import std;
/* -- Start Story override code removes background 1x1 image -- */
.template-product .lazy-image {background-image: none !important;}
/* - end - */
@blueprintmrk
blueprintmrk / snippet_change_state_to_US_states_dropdown.php
Created May 26, 2021 02:10 — forked from matadorjobs/snippet_change_state_to_US_states_dropdown.php
Change the state/province application form field to a drop-down of US states and territories.
<?php // omit opening PHP tag
add_filter( 'matador_application_fields_structure', 'mdocs_change_state_field_to_US_states_dropdown', 50, 1 );
/**
* Matador Change "State" to US States Dropdown
*
* Change the state/province application form field to a drop-down (<select>) of US states and territories.
*
* @since 2021-02-22
*
* @param array $fields Array of Form Fields
<?php
/**
* Add Logo to Job Structured Data (JSON+LD)
*
* @see https://matadorjobs.com/support/documentation/add-a-logo-to-google-for-jobs-listings/
*
* @param array $ld the Job Structured Data before save.
* @return array $ld the modified Job Structured Data for saving.
*/
function mj_add_logo_to_job_jsonld( $ld ) {
@blueprintmrk
blueprintmrk / gist:9fc2ffce3ca85813cd38c99537bab6c9
Created May 23, 2021 18:19 — forked from matt-bailey/gist:3609369
Terminal - Rsync merge files/folders from one server to another
# Merge from remote to local (exclude .svn folders)
rsync -av --exclude '.svn' [username]@[server]:/[path-to-folder]/[folder] ./
--progress
# Use this flag to show progress
# ./ means merge into the current folder (it needs to exist!)
# Reverse paths to go from local to remote
@blueprintmrk
blueprintmrk / template_page_full-width.php
Last active February 21, 2021 04:32
Christianus: Full Width Page Template (template_page_full-width.php)
<?php
/*
Template Name: Full Width
@blueprintmrk
blueprintmrk / compatibility.js
Created October 17, 2020 00:06 — forked from danielpataki/compatibility.js
jQuery in WordPress
/* Regular jQuery */
$('.hideable').on('click', function() {
$(this).hide();
})
/* Compatibility Mode */
jQuery('.hideable').on('click', function() {
jQuery(this).hide();
})