Skip to content

Instantly share code, notes, and snippets.

View Nav-Appaiya's full-sized avatar
🏠
Available

Nav Appaiya Nav-Appaiya

🏠
Available
View GitHub Profile
@Nav-Appaiya
Nav-Appaiya / index.html
Created August 7, 2023 18:45
Link Owl Carousel
<div class="stone-slider owl-carousel">
<div class="item">
<div class="image"><img src="https://www.gettyimages.ie/gi-resources/images/Homepage/Hero/UK/CMS_Creative_164657191_Kingfisher.jpg" alt=""></div>
<a href="https://www.gettyimages.ie/gi-resources/images/Homepage/Hero/UK/CMS_Creative_164657191_Kingfisher.jpg">Click Image</a>
</div>
</div>
valet stop
brew unlink php@7.0 php@7.1 php@7.2 php@7.3 php@7.4
brew link --force --overwrite php@7.4
brew services start php@7.4
composer global update
rm -f ~/.config/valet/valet.sock
valet install
@Nav-Appaiya
Nav-Appaiya / tar.gz
Created February 8, 2023 15:08
How to use tar for compression & extraction in linux
# 1: tar (create uncompressed archive) all files and directories in the current working directory recursively into an uncompressed tarball
tar cvf filename.tar *
# 2: Untar (extract uncompressed archive) all files and directories in an uncompressed tarball recursively into the current working directory
tar xvf filename.tar
# 3: tar (create gzipped archive) all files and directories in the current working directory recursively into a tarball compressed with gzip
tar cvzf filename.tar.gz *
# 4: Untar (extract gzipped archive) all files and directories in a tarball compressed with gzip recursively into the current working directory
@Nav-Appaiya
Nav-Appaiya / gist:37893ef633cd5badeaa06f67aedfaf48
Created January 21, 2023 18:40
Magento 2 - Indexer fails and gives no alive nodes found in your cluster while reindexing data
# obvisously your elastic is crashing on indexation, so allow it some more space to do the indexing with this curl call:
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
@Nav-Appaiya
Nav-Appaiya / gist:52228996b41f767f9874d811c88500fb
Created January 19, 2023 08:46
Curl for n98-magerun2.phar
curl -O https://files.magerun.net/n98-magerun2.phar
---
# netz98 magerun CLI tools for Magento 2
![n98-magerun Logo](.github/doc/magerun-logo.png)
The n98 magerun cli tools provides some handy tools to work with Magento
from command line.
@Nav-Appaiya
Nav-Appaiya / docker mysql connect mac
Created January 17, 2023 09:56
local docker mysql connect mac
mysql -h localhost -P 3306 --protocol=tcp -u root
@Nav-Appaiya
Nav-Appaiya / index.html
Created December 30, 2022 20:32
Load the slick.js library over CDN (scripts in the footer, styles in the header)
<!--------------------CSS------------------------------------------------------------------------------------------>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.css">
<!---------------------------------------------------------------------------------------------------------------- >
<!--------------------jQuery----------------------------------------------------------->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!------------------------------------------------------------------------------------->
<!-------------------JS---------------------------------------------------------------->
@Nav-Appaiya
Nav-Appaiya / gist:d4f46c6dbd1c38a3ff07a6a2dc5afa54
Created October 13, 2022 17:39
michaelvillar-timer for mac (brew one liner installation for a simple timer app on your mac)
brew install --cask michaelvillar-timer
@Nav-Appaiya
Nav-Appaiya / timer.js
Created September 10, 2022 14:14
A javascript snippet to see how long a script or import is taking, will count when executed in your browser console
var start = Date.now();
function output(variable){console.log(variable);}
setInterval(function() {
var delta = Date.now() - start; // milliseconds elapsed since start
output(Math.floor(delta / 1000)); // in seconds
// alternatively just show wall clock time:
output(new Date().toUTCString());
}, 1000); // update about every second