Skip to content

Instantly share code, notes, and snippets.

View PranamBhat's full-sized avatar
🎯
Focusing

Pranam K PranamBhat

🎯
Focusing
View GitHub Profile
@PranamBhat
PranamBhat / comments-section.markdown
Created December 28, 2021 08:33
Comments Section
@PranamBhat
PranamBhat / hoistingJavaScript.js
Created December 23, 2021 05:00
JavaScript Hoisting Examples
// works
function sayHi() { console.log('hi!')}
sayHi()
// works
@PranamBhat
PranamBhat / scrollTo.js
Created December 23, 2021 04:44
scrollTo without using jQuery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@PranamBhat
PranamBhat / browser.js
Created August 26, 2021 18:04
Browser Detection
// Opera 8.0+
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
var isFirefox = typeof InstallTrigger !== 'undefined';
// Safari 3.0+ "[object HTMLElementConstructor]"
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification));
// Internet Explorer 6-11
@PranamBhat
PranamBhat / iife.js
Created August 26, 2021 17:53
JavaScript Immediately Invoked Function Expression
for (var i=0; i<10; i++){
setTimeout(function(){
console.log(i);
}, 1000);
}
//Output : 10 10 10 10 10 10 10 10 10 10
@PranamBhat
PranamBhat / hoisting.js
Created August 26, 2021 17:48
JavaScript Hoisting
var a;
console.log(a);
a = 1;
//output : 1
<div class="row" style="margin-bottom: 12px;">
<div class="col-md-12" style="text-align: center;">
This page will refresh in <div class="time">{{minutes}}</div> Min <div class="time">{{seconds}}</div> Sec
</div>
</div>
@PranamBhat
PranamBhat / git.txt
Created February 22, 2021 15:13
Git Commands
1) Git Clone:
git clone <https://name-of-the-repository-link>
2) Creating a new branch:
git branch <branch-name>
3) Viewing branches:
git branch or git branch --list
4) Deleting a branch:
@PranamBhat
PranamBhat / emoji.md
Created February 22, 2021 14:34
Emoji's | Smiley's | .md file

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@PranamBhat
PranamBhat / angularCompiledFiles.html
Created July 31, 2020 13:14
Angular and Django integration : Update these lines on angular_index.html
<script type="type/javascript" src="{% static 'frontend/dist/runtime-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/polyfills-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/styles-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/vendor-es2015.js' %}"></script>
<script type="type/javascript" src="{% static 'frontend/dist/main-es2015.js' %}"></script>