Skip to content

Instantly share code, notes, and snippets.

💭
A catalyst of Change

JK jerinisready

💭
A catalyst of Change
Block or report user

Report or block jerinisready

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jerinisready
jerinisready / intl-input.html
Last active Nov 6, 2019
A quick Copy-Paste Example Of intlTelInput With Files from CDNJS. https://github.com/jackocnr/intl-tel-input#getting-started
View intl-input.html
<html>
<body>
<style>
@import "//cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.4/css/intlTelInput.css";
.iti__flag {background-image: url("//cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.4/img/flags.png");}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.iti__flag {background-image: url("//cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.4/img/flags@2x.png");}
}
</style>
<form>
View gist:23563821363a324c9f8228caf87eb7ee
https://freefrontend.com/html-css-404-page-templates/
https://codepen.io/leenalavanya/pen/OogLRd
View json-ld-gtm.html
<script>
(function(){
var data = {
"@context": "http://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{Page URL}}
},
"headline": {{SCHEMA - Article Headline}},
@jerinisready
jerinisready / mdb-nested-menu.html
Last active Jul 16, 2019
This is how we made a nested menu within default mdb jquery admin template. available over : https://mdbootstrap.com/snippets/jquery/jerin_john_kachirackal/936124
View mdb-nested-menu.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> Home | Administration </title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
<link href="/assets/css/material-dashboard.css" rel="stylesheet" />
@jerinisready
jerinisready / mdb-select2.html
Last active Jul 10, 2019
This is how to create MDB Select2 With your own css.. I have used Danger theme.. I wish to make it avail for all other colour codes in mdb!
View mdb-select2.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Material Design Select2 Bootstrap</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"></script>
@jerinisready
jerinisready / README.md
Last active Jun 29, 2019
How to Create A Friendly Unique id such as an automatically generated Invoice ID.
View README.md
Friendly ID / Auto Generate Invoice ID on First Save.

This is just modified version of friendly id for make this script compatible with python 3.x

Invoice numbers like "0000004" are a little unprofessional in that they expose how many sales a system has made, and can be used to monitor the rate of sales over a given time. They are also harder for customers to read back to you, especially if they are 10 digits long.

This is simply a perfect hash function to convert an integer (from eg an ID AutoField) to a unique number. The ID is then made shorter and more user-friendly by converting to a string of letters and numbers that wont be confused for one another (in speech or text).

To use it:
import friendly_id
@jerinisready
jerinisready / media_fiels_for_auth_user_only_views.py
Created Jun 29, 2019
Use nginx sendfile (X-Accel-Redirect) function to serve files but pass traffic through django. Can be used to serve media files only to logged-in users.
View media_fiels_for_auth_user_only_views.py
#https://djangosnippets.org/snippets/10664/
# views.py
from django.http import HttpResponse
from django.views.generic import View
class SendfileView(View):
prefix = ""
@jerinisready
jerinisready / affix_price_bar.html
Last active Jun 26, 2019
How To Create A Bottom Bar Affix using Jquery and Css
View affix_price_bar.html
<DOCTYPE html>
<head>
<title> Affix Price Bar </title>
<style>
#price_bar_container{}
#bottom-price-bar{position: fixed; margin-left: 260px; margin-bottom: 0; padding:0; }
#bottom-price-bar .card{ border-radius: 1px; transition: all 0.15s ease-in-out;}
@jerinisready
jerinisready / reload_on_cache_laod.html
Last active Jun 21, 2019
Reload page if a browser-cached version is loaded! ie; via back or forward buttons... https://stackoverflow.com/a/43043658/6419332
View reload_on_cache_laod.html
<script>
/** Credits: https://stackoverflow.com/a/43043658/6419332 */
window.addEventListener( "pageshow", function ( event ) {
var historyTraversal = event.persisted ||( typeof window.performance != "undefined" &&
window.performance.navigation.type === 2 );
if ( historyTraversal ) {window.location.reload();}
});
</script>
@jerinisready
jerinisready / scroll_menu.html
Created Jun 20, 2019
How to make li.active list element in side-menu to display screen
View scroll_menu.html
<script>
let el = document.querySelector('.scrollbar li.active');
let elementTop = $(el).offset().top;
let elementBottom = elementTop + $(el).outerHeight();
let viewportTop = $(window).scrollTop();
let viewportBottom = viewportTop + $(window).height() - 80;
if(!(elementBottom > viewportTop && elementTop < viewportBottom)){
el.scrollIntoView()
You can’t perform that action at this time.