Download and install talosctl
binary
wget https://github.com/talos-systems/talos/releases/download/v0.8.1/talosctl-linux-amd64
/** | |
* Get shipping info by using chosen method from cart | |
* | |
* @param string $type | |
* @return string | |
*/ | |
function ml_get_shipping_data($type = '') { | |
$current_shipping_method = WC()->session->get( 'chosen_shipping_methods' ); | |
if( ! is_array($current_shipping_method) ) { | |
return ''; |
jQuery(document).ready(function ($) { | |
// Find all anchor tags with href starting with "mailto:" | |
$('a[href^="mailto:"]').each(function () { | |
var email = $(this).attr('href').substring(7); // Extract the email address | |
// Encode the email address for obfuscation | |
var encodedEmail = ''; | |
for (var i = 0; i < email.length; i++) { | |
encodedEmail += '&#' + email.charCodeAt(i) + ';'; | |
} |
import openai | |
import requests | |
import textwrap | |
import uuid | |
# pip3 install openai requests | |
# setup the API credentials | |
es_username = "<your username>" | |
es_password = "<your password>" | |
es_url = "https://localhost:9200" |
add_action('woocommerce_thankyou_bacs', 'wpd_qr_code', 10, 1 ); | |
function wpd_qr_code( $order_id ) { | |
$order = wc_get_order( $order_id ); | |
$bacs_info = get_option( 'woocommerce_bacs_accounts'); | |
echo "<div style='display: grid; grid-template-columns: auto auto auto;'>"; | |
foreach ($bacs_info as $info ) { |
#WP block - see https://fr.wordpress.org/support/article/htaccess/ | |
RewriteEngine On | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# ajouter un slash après /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] |
#!/bin/sh | |
#Active response script for OPNSense platform (should work with pfSense too) | |
# should be in <OSSEC_PATH>/active-response/bin/opnsense.sh | |
#TrustUX Network 20160803 by JCC | |
#Block the offensor IP in the virusprot table - default in pfSense's/OPNSense's | |
#ref.: https://doc.pfsense.org/index.php/Virusprot | |
#Tested on OPNSense 16.7 and pfSense 2.2.x | |
#VARs | |
PFCTL_CMD="/sbin/pfctl" |
#!/usr/bin/perl | |
# Copyright (c) 2021 Luca Anastasio | |
# anastasio<dot>lu<at>gmail<dot>com | |
# Hookscript to avoid taking PCI passed through devices from running VMs | |
# also attaches them to their placeholders after guests are stopped | |
# You can set this via qm with | |
# qm set 100 --hookscript local:snippets/hookscript.pl | |
use strict; |
<?php | |
// Sets the default categories | |
function add_the_categories() { | |
$categories = array( | |
'Case Study', | |
'Blog', | |
'Article' | |
); | |
foreach( $categories as $category ) { | |
$exists = term_exists( $category, 'category' ); |