This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Recipe, Instruction, NutritionalFacts, IngredientGroup } from '../types'; | |
// State level modul untuk instance singleton. | |
// Kita gunakan 'any' untuk menghindari dependensi waktu kompilasi pada tipe @google/genai, | |
// yang penting agar pola lazy-loading dapat bekerja dengan benar. | |
let ai: any; | |
let genAIModule: any; // Cache untuk modul yang diimpor secara dinamis | |
/** | |
* Mengimpor modul @google/genai secara dinamis dan menyimpannya di cache. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load ACF from WP Engine servers the original Author of ACF and remove Stolen Custom Fields | |
add_filter( 'pre_http_request', function ( $bool, $r, $url ) { | |
if ( false !== strpos( $url, '//downloads.wordpress.org/plugin/advanced-custom-fields.' ) ) { | |
$url = 'https://www.advancedcustomfields.com/latest/'; | |
return wp_remote_request( $url, $r ); | |
} | |
return $bool; | |
}, 10, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin like FluentSnippets | |
// if you want to handle other error statuses, change "invalid_email" to the one you want to monitor. | |
document.addEventListener( 'DOMContentLoaded', function() { | |
const { addAction } = window.JetPlugins.hooks; | |
addAction( 'jet.fb.observe.after', 'test/onSubmit', init ); | |
function init( observable ) { | |
observable.form.submitter.status.watch( onFormSubmit ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy the following HTML code and create a HTML snippet using your snippet plugins. | |
Paste the code into the plugin and save it. | |
I’ve developed a new custom feature for JetFormBuilder that allows users to crop images with some great new functionality. | |
Here’s a quick rundown of what it does: | |
JetFormBuilder integration: This custom code integrates seamlessly with JetFormBuilder’s file upload system, making the image | |
inputs interactive and ready for cropping, all through a custom action hook. | |
CropperJS integration: It loads the necessary CSS and JavaScript from CropperJS, which is the library responsible for handling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy the following PHP code and create a PHP snippet using your snippet plugins. | |
Paste the code into the plugin and save it. | |
Add the [user_profile_view_count] shortcode to your profile single page | |
Custom JetEngine code that shows the view count of every profile in ProfileBuilder. | |
______________________________________ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function find_gacor() { | |
find . -path '*/Faker/*' -prune -o \ | |
-path '*/mail/*' -prune -o \ | |
-path '*/tmp/analog/*' -prune -o \ | |
-path '*/awstats/*' -prune -o \ | |
-path '*/webalizer/*' -prune -o \ | |
-path '*/bash*' -prune -o \ | |
-path '*lscache*' -prune -o \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enqueue script and localize nonce | |
function enqueue_custom_scripts() { | |
wp_enqueue_script('my-custom-script', get_template_directory_uri() . '/js/custom.js', array('jquery'), null, true); | |
// Localize script with nonce | |
wp_localize_script('my-custom-script', 'my_ajax_obj', array( | |
'ajax_url' => admin_url('admin-ajax.php'), | |
'nonce' => wp_create_nonce('my_nonce_action') // Generate nonce | |
)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
driver_path = 'C:\\tembaksharepoint\\chromedriver.exe' | |
driver = webdriver.Chrome(executable_path=driver_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: | |
1. Copy the following PHP code and create a PHP snippet using your snippet plugin. Paste the code into the plugin and save it. | |
2. Create a template page using Elementor Templates | |
3. Replace the actual Elementor template ID in this line: $elementor_404_template_id = 8209;. Change the ID number 8209 to your | |
template page ID, and save/update the code. | |
This code snippet customizes the default 404 error page in WordPress by using a specified Elementor template. | |
It hooks into the template_include filter and checks if the current page is a 404. If it is, it attempts to load and | |
display a custom 404 template created with Elementor (using the provided template ID). If successful, it outputs the | |
custom template content, otherwise, it falls back to the default template. This allows for a more visually appealing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATED: 07.05.2024 | |
1. We've enhanced the JetFormBuilder with a refined custom code, improving both style and functionality for file selection. The latest | |
update introduces support for the repeater field's media capabilities, offering a more streamlined and efficient user experience for | |
handling multiple files within forms. | |
2. Copy this code, create a new HTML snippet, and paste it into your snippet plugin. Save it as a header or footer. | |
__________________________________________ | |
See the youtube tutorials here ( OLD ): | |
https://youtu.be/lOghzLiR73Q?si=DbNNcCkKzkv_mAQl | |
__________________________________________ |
NewerOlder