Skip to content

Instantly share code, notes, and snippets.

View devenock's full-sized avatar
🎯
Exploring Tech

Enock Omondi devenock

🎯
Exploring Tech
View GitHub Profile
@devenock
devenock / date-mask.directive.ts
Created April 12, 2022 09:56 — forked from AntonGorelov/date-mask.directive.ts
Using text-mask with Material datepicker
import { Directive, ElementRef, OnDestroy } from '@angular/core';
import * as textMask from 'vanilla-text-mask/dist/vanillaTextMask.js';
@Directive({
selector: '[appMaskDate]'
})
export class MaskDateDirective implements OnDestroy {
public mask = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/]; // dd/mm/yyyy
public maskedInputController;
function getMinDeletions(s) {
const ordered_string = s.split('').sort().join('');
let delCount = 0;
for (let i = 0; i < ordered_string.length; i++) {
if (ordered_string[i] === ordered_string[i + 1]) {
delCount++;
}
}
@devenock
devenock / System Design.md
Created October 16, 2022 07:38 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@devenock
devenock / gist:fcbf0671d0e4af088aa412e415aa1b91
Created December 11, 2023 12:58 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

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: