Skip to content

Instantly share code, notes, and snippets.

View dompl's full-sized avatar

Dom dompl

  • Red Frog Studio
  • United Kingdom
View GitHub Profile
@dompl
dompl / ssl.md
Created February 26, 2024 09:30
SSL

In the future, you may expedite the issuance of the certificate in your Namecheap account > SSL Certificates page> click the link in the yellow table with DCV instructions to go to Edit methods>the "Edit methods" button. In the pop-up window, please click "Save Changes/Retry Alt DCV".

@dompl
dompl / foo.md
Created November 13, 2023 08:23
Permalinks under nginx

if (!-e $request_filename ){ set $test P; } if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon)){ set $test "${test}C"; } if ($test = PC){ rewrite ^ /index.php last; }

@dompl
dompl / NavigationAutoAssign.php
Last active November 5, 2023 03:50
Auto assign navigation after theme swith
<?php
/**
* Class NavigationAutoAssign
* Automatically assigns a navigation menu to a specified theme location in WordPress.
*/
class NavigationAutoAssign {
/**
* @var string The location identifier for the navigation menu within the theme.
@dompl
dompl / cname.txt
Created October 30, 2023 15:22
CNAME
Host
_D60DEBDF7C7954E5434758AEA14C3DC8.avolvesoftware.com
Target
64CDEFA5CAA71B480B83A106A2209375.C1A9952702C6DE371888D0CC387CB47F.653fca02e5829.comodoca.com
@dompl
dompl / yar-addons.js
Last active October 23, 2023 09:26
New Yarn addons
// yarn add @rollup/plugin-multi-entry --dev
// yarn add gulp-modernizr --dev
// yarn add gulp-modernizr
@dompl
dompl / functions.php
Created December 8, 2022 11:37 — forked from eugenoprea/functions.php
Gravity Forms - Checkbox Dynamic Population
// When true, the form will be saved to DB after dynamic population
define('EO_SAVE_FORM_ON_PRE_RENDER', true);
// Adds a filter to form id 7. Replace 26 with your actual form id
add_filter('gform_pre_render_7', 'eo_populate_checkbox');
add_filter('gform_admin_pre_render_7', 'eo_populate_checkbox');
function eo_populate_checkbox($form) {
if (EO_SAVE_FORM_ON_PRE_RENDER)
@dompl
dompl / banner.css
Last active October 27, 2022 07:03
Global Banner
#global-container{background-color:#000 !important;color:#fff;text-align:center;padding:1.5rem 0}#global-container .wrapper{max-width:95%;margin-left:auto;margin-right:auto}#global-container p{margin:0;font-size:.8rem}#global-container p:last-child{margin-top:10px;text-transform:uppercase}#global-container img{margin-bottom:20px}#global-container a{color:#fff;text-decoration:underline;font-weight:bold}#global-container a.tel{text-decoration:none}@media(min-width: 1024px){#global-container{text-align:left}#global-container .wrapper{display:flex;align-items:center;justify-content:space-between;max-width:100%}#global-container p{font-size:1rem;line-height:1.44rem}#global-container .left{margin-right:30px;margin-bottom:0}#global-container img{margin-bottom:0}}
@dompl
dompl / wp_category_with_args.php
Created September 9, 2022 06:53
Get WordPress categories list with args
$categories = get_categories( [
'taxonomy' => 'category',
'type' => 'post',
'child_of' => 0,
'parent' => '',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'exclude' => '',
@dompl
dompl / gc.txt
Created August 1, 2022 11:53
Global Coatings Keywords
Sand blasting
Grit blasting
Aluminium oxide blasting
Blasting to ISO8501
Painting to NORSOK M501
@dompl
dompl / woo-js-events.js
Last active October 22, 2023 06:12
WooCommerce - List of JS events
/*
* To find a complete list of all events (and stay updated on any new ones added)
* you can consult the .js files in the directory:
* /wp-content/plugins/woocommerce/assets/js/frontend
*/
// Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );