Skip to content

Instantly share code, notes, and snippets.

View Alucard0x1's full-sized avatar
👽
alien is exist

Alucard0x1 Alucard0x1

👽
alien is exist
View GitHub Profile
@Alucard0x1
Alucard0x1 / gist:1e2d396f2101f3b707a59a44d41fffac
Last active October 11, 2025 11:53
Recipe System Prompt
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.
@Alucard0x1
Alucard0x1 / gist:c464b81aa78a2588b886747d9b570ad4
Created October 14, 2024 12:06
Snippet Load ACF from WP Engine servers the original Author of ACF and remove Stolen Custom Fields. Credit to @xaver_
// 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);
@Alucard0x1
Alucard0x1 / code
Created September 28, 2024 12:43 — forked from Lonsdale201/code
JetFormBuilder - Check ajax submit success or other status
// 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 );
@Alucard0x1
Alucard0x1 / gist:7ee5c5168efc4e522fe42ca942ba6dbf
Created September 28, 2024 12:42 — forked from Qubadi/gist:b918070aaf15f1e48b0b2ad9baeeb117
JetFormBuilder that allows users to crop images with some great new functionality
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
@Alucard0x1
Alucard0x1 / gist:32cd904f07ac06ee5dee3064031dc070
Created August 27, 2024 01:16 — forked from Qubadi/gist:ecc4e8db265ef2f2e642120bac2a8ef2
JetEngine profilebuilder, profile view counter
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.
______________________________________
@Alucard0x1
Alucard0x1 / Find_gacor.sh
Last active August 26, 2024 08:51
Find_gacor.sh
#!/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 \
// 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
));
}
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)
@Alucard0x1
Alucard0x1 / gist:ebcf302df8ddd5116e3521ff89f02bda
Created July 20, 2024 15:43 — forked from Qubadi/gist:74e13293a7ebd23058ee005f9c66497d
Enhance WordPress 404 Page Using Elementor Template
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
@Alucard0x1
Alucard0x1 / gist:0045620f93ac9c091fd4ec3fc7503b2d
Created May 7, 2024 09:05 — forked from Qubadi/gist:c83878e6244261b39ff387d4c9739f67
JetFormBuilder media field, enhanced choose file
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
__________________________________________