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 / Firewall.js
Created March 1, 2024 11:52 — forked from havvg/Firewall.js
ExtJS 6: JSON Web Token API Login with Promises
Ext.define('App.security.Firewall', {
singleton: true,
requires: [
'App.security.TokenStorage'
],
isLoggedIn: function() {
return null !== App.security.TokenStorage.retrieve();
},
@Nav-Appaiya
Nav-Appaiya / SIKB0102_Pakbon.xml
Created February 15, 2024 20:46
SIKB0102_Pakbon.xml
<?xml version="1.0" encoding="UTF-8"?>
<sikb:sikb0102
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gsr="http://www.isotc211.org/2005/gsr"
xmlns:gss="http://www.isotc211.org/2005/gss"
xmlns:gts="http://www.isotc211.org/2005/gts"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:nen3610="http://www.ravi.nl/nen3610/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?xml version="1.0" encoding="UTF-8"?>
<sikb:sikb0102
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gsr="http://www.isotc211.org/2005/gsr"
xmlns:gss="http://www.isotc211.org/2005/gss"
xmlns:gts="http://www.isotc211.org/2005/gts"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:nen3610="http://www.ravi.nl/nen3610/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@Nav-Appaiya
Nav-Appaiya / remove_all_orders_before.sql
Last active February 7, 2024 09:36
Delete all woocommerce orders before a specific data [with SQL]
DELETE FROM wp_woocommerce_order_items WHERE order_id IN ( SELECT ID FROM wp_posts WHERE post_date BETWEEN '2019-01-01' AND '2023-01-01');
DELETE FROM wp_comments WHERE comment_type = 'order_note' AND comment_post_ID IN ( SELECT ID FROM wp_posts WHERE post_date BETWEEN '2019-01-01' AND '2023-01-01' AND post_type='shop_order');
DELETE FROM wp_postmeta WHERE post_id IN ( SELECT ID FROM wp_posts WHERE post_date BETWEEN '2019-01-01' AND '2023-01-01' AND post_type = 'shop_order');
@Nav-Appaiya
Nav-Appaiya / index.html
Created August 28, 2023 23:13
Owl Carousel - YouTube Style
<div class="container">
<div class="mhn-slide owl-carousel">
<div class="mhn-item">
<div class="mhn-inner">
<img src="https://source.unsplash.com/600x400/?paper">
<div class="mhn-img"><div class="loader-circle"><div class="loader-stroke-left"></div><div class="loader-stroke-right"></div></div></div>
<div class="mhn-text">
<h4>Paper</h4>
<p>Paper is a thin material produced by pressing together moist fibres of cellulose pulp derived from wood, rags or grasses, and drying them into flexible sheets.</p>
</div>
@Nav-Appaiya
Nav-Appaiya / gist:1102b5dad0585ee4fe5d61902351d945
Created August 26, 2023 20:13
Load jquery from console (inclusde jquery via javascript)
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
22:12:36.944
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.3.11/min/tiny-slider.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.1/js/all.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.3.11/tiny-slider.css" rel="stylesheet" />
<h1> Tiny slider example</h1>
<div class="slider-container">
<div class="my-slider">
<div class="slider-item">
<div class="card">
@Nav-Appaiya
Nav-Appaiya / index.html
Created August 21, 2023 10:16
Radio Group as Cards with Tailwind CSS
<body class="p-4 flex items-center justify-center bg-gray-100 min-h-screen">
<form class="w-full max-w-screen-md mx-auto">
<fieldset class="space-y-6">
<div class="flex items-center justify-between py-4 border-b border-gray-300">
<legend class="text-2xl text-gray-700 mr-4">Change Plan</legend>
<a href="#" class="font-medium text-gray-500 hover:text-gray-700">Cancel your plan</a>
</div>
<div class="grid sm:grid-cols-4 gap-6">
<label for="plan-hobby" class="relative flex flex-col bg-white p-5 rounded-lg shadow-md cursor-pointer">
<span class="font-semibold text-gray-500 leading-tight uppercase mb-3">Hobby</span>
@Nav-Appaiya
Nav-Appaiya / ascii-art.txt
Created August 14, 2023 19:33
It is all fun and games until someone gets hacked!
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@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>