<div class="snowflakes" aria-hidden="true">
<div class="snowflake">
❅
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
View main.yml
This file contains 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
# .github/workflows/main.yml | |
name: Trigger Netlify Build | |
on: | |
schedule: | |
# Run at 0000 daily | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
name: Request Netlify Webhook |
View index.php
This file contains 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
<?php | |
add_filter( 'woocommerce_available_payment_gateways', 'mcnaveen_payment_gateway_based_on_country' ); | |
function mcnaveen_payment_gateway_based_on_country( $available_gateways ) { | |
if ( is_admin() ) return $available_gateways; | |
if ( WC()->customer->get_billing_country() !== 'IN' ) { | |
unset( $available_gateways['wc-razorpay'] ); | |
} else { | |
if ( WC()->customer->get_billing_country() === 'IN' ) { | |
unset( $available_gateways['stripe'] ); |
View script popup.js
This file contains 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
<script type="text/javascript"> | |
function personalizeryInit() { | |
let params = new URL(document.location).searchParams; | |
let name = params.get("firstname"); | |
let email = params.get("email"); | |
document.querySelector("#form-field-field_8fd15b6").value = name; | |
document.querySelector("#form-field-email").value = email; | |
} | |
personalizeryInit(); | |
</script> |
View script.js
This file contains 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
<script type="text/javascript"> | |
function personalizeryInit() { | |
let params = new URL(document.location).searchParams; | |
let name = params.get("firstname"); | |
let email = params.get("email"); | |
document.querySelector("#form-field-name").value = name; | |
document.querySelector("#form-field-email").value = email; | |
} | |
personalizeryInit(); |
View file.js
This file contains 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
const storedValueAsNumber = Number(localStorage.getItem("limit")); | |
const [userLimit, setUserLimit] = useState( | |
Number.isInteger(storedValueAsNumber) ? storedValueAsNumber : 0 | |
); | |
useEffect(() => { | |
localStorage.setItem("limit", String(userLimit)); | |
}, [userLimit]); |
View Snow Flakes with HTML and CSS.md
View replace pipe inside double quotes with comma.md
Example Text:
Hello,"Hello | World"
Hello | How are you?,
I want to replace the pipe |
which is present inside the double quotes with comma ,
Here is the command to do that.
View mautic.conf
This file contains 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
server { | |
listen 80; | |
server_name YOURDOMAIN NAME; | |
root /var/www/mautic; | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
access_log /var/log/nginx/mautic-access.log; | |
error_log /var/log/nginx/mautic-error.log; |
View script.js
This file contains 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
function onFormSubmit(e) { | |
var url = "WEBHOOKURL"; //n8n WebHook URL | |
var Field1 = ' '; | |
var Field2 = ' '; | |
var form = FormApp.openById("FORMID"); // Copy the Form ID from the URL | |
var formResponses = form.getResponses(); | |
var formResponse = formResponses[formResponses.length - 1]; | |
var itemResponses = formResponse.getItemResponses(); |
NewerOlder