Skip to content

Instantly share code, notes, and snippets.

View koolkamalkishor's full-sized avatar
🏠
Working from home

KAMAL KISHOR koolkamalkishor

🏠
Working from home
View GitHub Profile
// backup service
function makeCopy() {
// generates the timestamp and stores in variable formattedDate as year-month-date hour-minute-second
var timeZone = Session.getScriptTimeZone();
var formattedDate = Utilities.formatDate(new Date(), timeZone, "yyyy-MM-dd' 'HH:mm:ss");
// gets the name of the original file and appends the word "copy" followed by the timestamp stored in formattedDate
var name = SpreadsheetApp.getActiveSpreadsheet().getName() + " Copy " + formattedDate;
@koolkamalkishor
koolkamalkishor / unsaved-changes-guard.ts
Created November 4, 2022 06:29 — forked from Splaktar/unsaved-changes-guard.ts
Guard against navigating away when there are unsaved changes
import {CanDeactivate, Router} from '@angular/router';
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material';
export interface CanComponentDeactivate {
canDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;
}
@koolkamalkishor
koolkamalkishor / apple-touch-startup-image.html
Created July 18, 2020 10:56 — forked from EvanBacon/apple-touch-startup-image.html
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"
@koolkamalkishor
koolkamalkishor / meta-tags.md
Created July 13, 2020 08:42 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags