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 / tamil-validation.ts
Last active October 18, 2022 06:04
Validation Regex
/^[\u0b80-\u0bff]+$/.test("யாத்திராகமம்");
import {
Directive,
ElementRef,
EventEmitter,
Inject,
Input,
OnChanges,
OnDestroy,
OnInit,
Output,
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;
@brandonjp
brandonjp / findOverflowParents.js
Last active May 3, 2024 09:17
find overflow:hidden ancestors
// when you're trying to use `position:sticky` on an element
// you'll have trouble if any parent/ancestor element has
// overflow set to anything other than "visible" (such as: auto,hidden,overlay,scroll)
// & turns out if a parent is `display:flex` it might need some love
// (to remedy this you can set the `align-self` of your sticky element)
// see here for how the display & align-self properties affect: http://bit.ly/2ZaRu4o
// so, to find those troublesome parents...
// copy & paste this into Chrome Inspector/Dev Tools console
// (and be sure to change the #stickyElement below, if needed)
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
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