Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / shopify-geo-optimization.liquid
Last active August 29, 2026 00:20 — forked from henu-wang/shopify-geo-optimization.liquid
Shopify Liquid snippets for JSON-LD structured data, AI crawler meta tags, and GEO optimization
{% comment %}
============================================================================
Shopify Theme: GEO Optimization Snippets for AI Search Visibility
============================================================================
Generative Engine Optimization (GEO) snippets for Shopify Liquid themes.
Helps your store appear in AI-generated answers from ChatGPT, Perplexity,
Google AI Overviews, and other generative search engines.
Measure your AI search visibility: https://geoscoreai.com
<?php
/**
* Sports-bench-team-rest-controller.php
*
* Creates a REST API controller for teams
*
* @package Sports Bench
*
* @author Jacob Martella
*
<?php
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Client;
@dexit
dexit / data.yaml
Last active May 27, 2026 14:57
displayadverapi.json
openapi: 3.0.1
info:
title: Display Advert API
description: |-
Get and display adverts from Find an apprenticeship.
**Note.** It is not recommended to use The Display Advert API directly from a browser and as such we have not enabled CORS for this API. Instead, we recommend you call the API intermittently to retrieve the latest vacancies, store those vacancies in your own data store, and then change your website to read those vacancies from your own data store.
version: '2'
servers:
- url: https://api.apprenticeships.education.gov.uk/vacancies
paths:
- CPT Title Capitalisation (Page, Post, Product etc)
- Page title length trim - https://wordpress.org/plugins/cpt-post-title-trimer/ or https://wordpress.org/plugins/limit-characters-in-title/
- Post title length trim - https://wordpress.org/plugins/cpt-post-title-trimer/ or https://wordpress.org/plugins/limit-characters-in-title/
- Product title length trim - https://wordpress.org/plugins/cpt-post-title-trimer/ or https://wordpress.org/plugins/limit-characters-in-title/
- Taxonomy title length htrim - https://wordpress.org/plugins/cpt-post-title-trimer/ or https://wordpress.org/plugins/limit-characters-in-title/
- Page title unique check - https://wordpress.org/plugins/unique-title-checker/
- Post title unique check - https://wordpress.org/plugins/unique-title-checker/
- Product title unique check - https://wordpress.org/plugins/unique-title-checker/
- Meta Title - trim by standard full compatability with Yoast
@dexit
dexit / gist:6c31fc1e61d5827e7abc5df46d773348
Last active April 7, 2026 09:53
Docker moving partition #devop #dexit

How to Move Docker's Storage Location to an External Drive

Author: nawazdhandala

Tags: Docker, Storage, DevOps, Linux, Docker Daemon

Description: Learn how to relocate Docker's default data directory to an external drive to free up disk space and improve performance.


@dexit
dexit / class.php
Created March 25, 2026 17:19 — forked from hlashbrooke/class.php
A complete, versatile options page class for any WordPress plugin
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
@dexit
dexit / wp-list-table-custom.php
Created March 25, 2026 17:09 — forked from faiyazalam/wp-list-table-custom.php
WP_List_Table - Custom
<?php
/*
Plugin Name: WordPress - WP_List_Table - Custom
*/
add_action( 'admin_menu','register_my_custom_menu_page');
function register_my_custom_menu_page(){
global $new_menu_page;
// creating admin menu
@dexit
dexit / edit.js
Created March 25, 2026 14:39 — forked from carlodaniele/edit.js
A custom Gutenberg block to add and manage custom meta fields in WordPress
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
@dexit
dexit / servicesldjson-with-books.js
Last active February 9, 2026 16:19
services LD JSON
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Organization",
"name": "Safaraz Ali",
"hasOfferCatalog": {
"@type": "OfferCatalog",
"name": "Canny Bites Business Books",
"url": "https://safaraz.co.uk/canny-bites-business-books/",
"itemListElement": [