Skip to content

Instantly share code, notes, and snippets.

View nithesh1992's full-sized avatar

Nithesh Nekkanti nithesh1992

View GitHub Profile
@nithesh1992
nithesh1992 / day-dif.txt
Created October 8, 2021 06:21 — forked from sayyedhammadali/day-dif.txt
Find the number of days between two dataes
const dayDif = (date1, date2) => Math.ceil(Math.abs(date1.getTime() - date2.getTime()) / 86400000)
dayDif(new Date("2020-10-21"), new Date("2021-10-22"))
// Result: 366
const copyToClipboard = (text) => navigator.clipboard.writeText(text);
copyToClipboard("This Sring is Copied To Clipboard.");
@nithesh1992
nithesh1992 / componentEvent.evt
Created May 10, 2017 19:34 — forked from pozil/componentEvent.evt
Lightning - Passing data up the component hierarchy via a component event
<aura:event type="COMPONENT">
<aura:attribute name="param" type="String"/>
</aura:event>
@nithesh1992
nithesh1992 / livechat.html
Created May 1, 2017 22:04 — forked from soe/livechat.html
sample page on how to include Salesforce Live Agent button code and deployment code
<html>
<body>
<!-- live chat button -->
<a id="liveagent_button_online_573i00000004DD7" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573i00000004DD7')">
Online Chat
</a>
<div id="liveagent_button_offline_573i00000004DD7" style="display: none;">
Offline Chat
</div>