Skip to content

Instantly share code, notes, and snippets.

View saravanapriyanm's full-sized avatar
🐞
Bugs... Bugs everywhere.

Saravanapriyan saravanapriyanm

🐞
Bugs... Bugs everywhere.
View GitHub Profile
@saravanapriyanm
saravanapriyanm / embedded-file-viewer.md
Created February 20, 2024 16:15 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

$match: { $expr: {$eq: [{$week: "$Document.data.DATE"}, 27]} }

@saravanapriyanm
saravanapriyanm / git-workflow.md
Created November 24, 2022 05:41
GIT Workflow

Git Workflow

Commit Title Prefixes ➕

For bug fixes

fix: <bug fix description>

For new features

const breadcrumbs = [{
filterKey: 'Base',
filterValue: 'Base',
nextKey: 'Region'
}];
function addLevel({ nextKey, filterKey, filterValue }) {
const existing = breadcrumbs.find((breadcrumb) => breadcrumb.filterKey === filterKey);
if (existing) {
existing.filterValue = filterValue;
@saravanapriyanm
saravanapriyanm / angular-commands.md
Last active October 27, 2022 09:16
Angular CLI commands

#Angular CLI commands

Lazy loading module with routing and 1 component

ng generate module customers --route customers --module app.module
@saravanapriyanm
saravanapriyanm / tamil-validation.ts
Last active October 18, 2022 06:04
Validation Regex
/^[\u0b80-\u0bff]+$/.test("யாத்திராகமம்");
enum Claims {
viewPage1 = 1<<0,
editPage1 = 1<<1,
approvePage1 = 1<<2,
viewPage2 = 1<<3,
editPage2 = 1<<4,
approvePage2 = 1<<5,
}
const dashboardBuilder = Claims.viewPage1 + Claims.editPage1 + Claims.approvePage1;
import {
Directive,
ElementRef,
EventEmitter,
Inject,
Input,
OnChanges,
OnDestroy,
OnInit,
Output,
@saravanapriyanm
saravanapriyanm / console
Created February 15, 2022 08:56
gisto:15/02/2022: console
console.log()
@saravanapriyanm
saravanapriyanm / promise-observable-return-true.js
Created February 15, 2022 05:10
Promise and Observable dev mock response
// Promise
return new Promise((resolve, reject) => {
resolve(true);
});
// RxJs Observable
return new Observable(subscriber => {
subscriber.next(true);
subscriber.complete();
});