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 / SSL-nginx-Docker.md
Created October 2, 2025 18:24 — forked from dahlsailrunner/SSL-nginx-Docker.md
SSL with Docker images using nginx as reverse proxy

Docker with SSL and an nginx reverse proxy

Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.

Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).

1. Create a conf file with information about the cert you'll be creating

It should look something like the content below; call it my-site.conf or something like that.

@dexit
dexit / php-serialized-column.php
Created July 30, 2025 15:41 — forked from vrana/php-serialized-column.php
PHP Serialized Data previewer in Adminer Editor
<?php
/** Display PHP serialized values as table in edit. Using Jakub Vrana and Martin Zeman's JSON Adminer plugin (https://raw.githubusercontent.com/vrana/adminer/master/plugins/json-column.php) as a skeleton for this plugin.
* @link https://www.adminer.org/plugins/#use
* @author Don Wilson, https://pyxol.com/
* @author Jakub Vrana, https://www.vrana.cz/
* @author Martin Zeman (Zemistr), http://www.zemistr.eu/
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerPHPSerializedColumn {
@dexit
dexit / permalink.php
Created July 28, 2025 11:05 — forked from mehrshaddarzi/permalink.php
add Post Id before Custom Post Type Slug in WordPress
<!-- search for special one post type -->
<div class="search-form">
<form role="search" method="get" class="search-form mc-form bottom" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input type="search" class="search-field" placeholder="<?php esc_html_e( 'Enter your keyword', 'text-domain' ) ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" />
<input type="hidden" name="post_type" value="product">
<button type="submit" class="search-submit"><span class="ti ti-search"></span></button>
</form>
</div>
<!-- search for special two or more post type -->
@dexit
dexit / custom-control-init.php
Created July 28, 2025 10:56 — forked from iqbalrony/custom-control-init.php
Create Elementor Custom Control. Image selector control
<?php
namespace ElementorControls;
if (!defined('ABSPATH')) exit; // Exit if accessed directly
class Elementor_Custom_Controls {
public function includes() {
require_once(plugin_dir_path(__FILE__).'inc/elementor/image-selector-control.php');
}
@dexit
dexit / resume.json
Last active October 8, 2025 12:10 — forked from ThomasMary40/resume.json
My resume
{
"basics": {
"name": "Rihards Mantejs",
"label": "Web Developer",
"email": "[email protected]",
"phone": "07471617269",
"url": "https://www.linkedin.com/in/rihards-mantejs",
"summary": "Highly experienced and results-oriented IT professional with over 15 years of progressive experience in diverse IT environments, seeking to leverage a comprehensive skill set as a Systems Development Officer. Proven ability to support the full lifecycle of system development, from initial analysis and design through to implementation, deployment, and ongoing maintenance. Expertise spans full-stack development, robust systems management, seamless API integration, database management, and task automation using scripting languages such as Bash, PoSH, and PHP. Adept at translating complex business requirements into effective technical specifications, providing critical technical support, and facilitating the integration of new systems with existing infrastructure. Possesses strong analytical, problem-solving,
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json",
"basics": {
"email": "[email protected]",
"label": "Microsoft 365 Implementation Specialist",
"location": {
"city": "Boston",
"countryCode": "UK",
"region": "Lincolnshire"
},
@dexit
dexit / filter_current_post_meta.php
Created July 25, 2025 10:38 — forked from mehrshaddarzi/filter_current_post_meta.php
Dynamic tags in elementor with php
<?php
add_filter( 'elementor/dynamic_tags/tag_value', function( $value, $tag ) {
// بررسی اینکه آیا تگ مورد نظر "custom field" هست
if ( $tag->get_name() === 'post-custom-field' ) {
// گرفتن post ID فعلی
$post_id = get_the_ID();
@dexit
dexit / functions.php
Created July 25, 2025 10:36 — forked from pingram3541/functions.php
capture $_POST on specific page w/ Elementor widget of matching ID
if ( ! function_exists('write_log')) {
function write_log ( $log ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}
@dexit
dexit / remove_elementor_ai.php
Created July 25, 2025 10:35 — forked from mateitudor/remove_elementor_ai.php
Remove Elementor AI including the silly per user checkboxes like "Enable Elementor AI functionality"
function disable_elementor_ai_module() {
if ( class_exists( 'Elementor\Plugin' ) && isset( \Elementor\Plugin::$instance->modules_manager ) ) {
$modules_manager = \Elementor\Plugin::$instance->modules_manager;
// Disable AI module entirely by removing its registration
remove_all_actions( 'personal_options' );
remove_all_actions( 'personal_options_update' );
remove_all_actions( 'edit_user_profile_update' );
// Disable AI option across all users