What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-05 09:45:02
if product open display this button
add_action( 'woocommerce_single_product_summary', 'custom_button_by_categories', 32 ,0 ); function custom_button_by_categories(){ global $product; // Define your categories in this array (can be Ids, slugs or names) $product_cats = array... Add solution -
TypeScript 2021-10-05 09:16:05
s3 redirect all requests to index.html
It's very easy to solve it without url hacks, with CloudFront help. Create S3 bucket, for example: react Create CloudFront distributions with these settings: Default Root Object: index.html Origin Domain Name: S3 bucket domain, for example: react.s3.amaz... Add solution -
Javascript 2021-10-03 20:04:04
serving html and css with node js
// HTTP Module for Creating Server and Serving Static Files Using Node.js // Static Files: HTML, CSS, JS, Images // Get Complete Source Code from Pabbly.com var http = require('http'); var fs = require('fs'); var path = require('path'); http.createServe... Add solution -
Shell/Bash 2021-10-03 16:34:04
shell script to reindex elasticsearch
#!/bin/bash #ES_HOST="localhost" #ES_PORT="9200" TMP="_v2" echo "**** Script Execution Started ****" echo " " echo "**** Fetching List of Indices Elasticsearch Reindexing ****" curl -s -X GET '... Add solution -
Javascript 2021-10-02 22:05:04
js code for webpage download progress bar
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="a1" data-filename="filename.xml">Click to download</div> <script> $('#a1').click(function() { ... Add solution -
Javascript 2021-09-30 18:44:08
ngx-doc-viewer
function reloadIFrame() { var iframe = document.getElementById("iFrame"); console.log(frame.contentDocument.URL); //work control if(iframe.contentDocument.URL == "about:blank"){ iframe.src = iframe.src; } } var timerId = set... Add solution -
Javascript 2021-09-30 13:02:02
row append and calculation in jquery datatable
Plain text12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364$(document).ready(function() { loadMyItems(); }); function loadMyItems()... Add solution