This also requires disabling webpack asset cacheBusting in the production build
src: https://danielbachhuber.com/tip/trigger-varnish-cache-purge-on-deployment-to-wp-engine/
<?php
add_action( 'init', function(){
// Replace '901bcc678021c0e12f1583085cafda1d' with a secret of your own.
if ( ! empty( $_GET['purge-cache'] ) && '901bcc678021c0e12f1583085cafda1d' === $_GET['purge-cache'] ) {
WpeCommon::purge_varnish_cache_all();
echo 'Cache purged';
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"exclude": [ | |
".git/**", | |
"node_modules/**", | |
"bower_components/**" | |
], | |
"always-semicolon": true, | |
"color-case": "upper", | |
"block-indent": " ", | |
"color-shorthand": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Use Cmd+\ to show 1Password everywhere except Visual Studio Code and Atom | |
function activate_1password() | |
local client = hs.application.frontmostApplication() | |
local log = hs.logger.new('mymodule','debug') | |
log.i(client:title()) | |
if client:title() == 'Code' then | |
hs.eventtap.keyStroke({"cmd"}, "f10") | |
elseif client:title() == 'Atom' then | |
hs.eventtap.keyStroke({"cmd"}, "f11") | |
else |
These captures the details provide by the aws s3api put-bucket-logging help
log and documented here
https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-logging.html
aws s3api put-bucket-acl --bucket $BUCKET --profile $PROFILE --grant-write URI=http://acs.amazonaws.com/groups/s3/LogDelivery --grant-read-acp URI=http://acs.amazonaws.com/groups/s3/LogDelivery
This have been modified to gracefully fail when used on Post types that do not support the described taxonomy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recursively get taxonomy and its children | |
* | |
* @param string $taxonomy | |
* @param int $parent - parent term id | |
* @return array | |
*/ | |
function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$grid-columns: 1; | |
$layoutBreakPoints: ( | |
"med-small" : 580px, | |
); | |
@each $name, $width in $layoutBreakPoints { | |
.u-col { | |
@for $col from 1 through $grid-columns { | |
&-test { | |
background: red ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// base | |
:root { | |
--black: black; | |
--light-gray: #eee; | |
--white: white; | |
--navy: navy; | |
--green: green; | |
} |
OlderNewer