<div class="snowflakes" aria-hidden="true">
<div class="snowflake">
❅
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
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
FROM node:16 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Copy package.json | |
COPY package*.json ./ | |
# Install dependencies | |
RUN yarn install |
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 |
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'] ); |
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> |
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(); |
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]); |
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.
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; |
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(); |