Skip to content

Instantly share code, notes, and snippets.

View robertannett's full-sized avatar

Robert Annett robertannett

View GitHub Profile
@robertannett
robertannett / bgcover.css
Created February 14, 2023 10:52
Background Cover Image
background-image: url(images/bg.jpg);
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@robertannett
robertannett / sample-post.html
Last active September 16, 2022 14:21
Blog post sample content
<article class="wysiwyg">
<h2>Content Title</h2>
<img alt="Example of an image" src="https://via.placeholder.com/1024x450">
<p>Sadipscing elitr, sed diam <a href="">nonumy eirmod tempor</a> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </p>
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </p>
<h3>This is h3 example title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut eni
@robertannett
robertannett / dealers.scss
Created July 26, 2022 16:27
Store Locator customisation
.dealers-page {
padding: 4em 0em;
@include breakpoint(medium down) {
padding: 2em 0em;
}
.intro-container {
@robertannett
robertannett / DefaultMethod.php
Created June 27, 2022 20:58
ApplePay & GooglePay for Axcess Payments Samples
<?php
/**
* * You are allowed to use this API in your web application.
*
* Copyright (C) 2018 by customweb GmbH
*
* This program is licenced under the customweb software licence. With the
* purchase or the installation of the software in your application you
* accept the licence agreement. The allowed usage is outlined in the
@robertannett
robertannett / VS Code Live Sass Compiler config
Created January 4, 2022 17:59
VS Code Live Sass Compiler config
// How to update Settings: https://stackoverflow.com/questions/65908987/vs-code-how-to-open-settings-json-file
{
"workbench.colorTheme": "Default Dark+",
"editor.accessibilitySupport": "off",
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": null
},
select
p.ID as order_id,
p.post_date,
max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email,
max( CASE WHEN pm.meta_key = '_billing_first_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_first_name,
max( CASE WHEN pm.meta_key = '_billing_last_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_last_name,
max( CASE WHEN pm.meta_key = '_billing_address_1' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_1,
max( CASE WHEN pm.meta_key = '_billing_address_2' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_2,
max( CASE WHEN pm.meta_key = '_billing_city' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_city,
max( CASE WHEN pm.meta_key = '_billing_state' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_state,
@robertannett
robertannett / gist:60ad8e7bc3bfab1e1e253c19333a29cf
Created August 11, 2021 10:42
SQL - Update Wordpress Password
UPDATE wp_users
SET user_pass= MD5('password')
WHERE ID = 9999;
@robertannett
robertannett / remove-thumbs.txt
Last active July 13, 2021 10:39
Delete Wordpress Generated Thumbs
// cd to /uploads folder and run
find . -name "*-*x*.*" -type f -delete
@robertannett
robertannett / whitelist-blocks.php
Created May 31, 2021 14:52
Wordpress - Disable Gutenberg blocks / Whitelist Blocks
/*
** Reference: https://rudrastyh.com/gutenberg/remove-default-blocks.html
*/
add_filter( 'allowed_block_types', 'custom_allowed_block_types', 10, 2 );
function custom_allowed_block_types( $allowed_blocks, $post ) {
$allowed_blocks = array(
'core/paragraph',
@robertannett
robertannett / gutenberg-blocks.php
Last active June 3, 2021 16:48
Wordpress - Gutenberg Core Block List
$default_blocks = array(
'core/paragraph',
'core/image',
'core/heading',
'core/gallery',
'core/list',
'core/quote',
'core/audio',
'core/cover',
'core/file',