Skip to content

Instantly share code, notes, and snippets.

View dackyD's full-sized avatar

Harvey Daclan dackyD

  • Kristiansand, Norway
View GitHub Profile
@bradrice
bradrice / my.modal-context.ts
Last active June 11, 2024 10:49
my-modal-component
import { Page } from '@nativescript/core';
import { ModalDialogParams } from "@nativescript/angular";
import { MyModalContext } from '../../models/my.modal-context';
export class MyModalComponentBase<T, R> {
protected modalContext: MyModalContext<T, R>;
protected closeCallback: (...args: any[])=> any;
public get title() {
@LayZeeDK
LayZeeDK / dashboard.component.html
Last active February 8, 2023 23:16
Dashboard: Shallow and integrated routing component test suites.
<h3>Top Heroes</h3>
<div class="grid grid-pad">
<a *ngFor="let hero of heroes" class="col-1-4"
routerLink="/detail/{{hero.id}}">
<div class="module hero">
<h4>{{hero.name}}</h4>
</div>
</a>
</div>
import { ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Input, Type, ViewContainerRef } from '@angular/core';
import { Subscription } from 'rxjs';
@Directive({
selector: '[lazyComp]'
})
export class LazyCompDirective {
private _inputs;
private _outputs;
private subscription = new Subscription();
/**
* Converts an ArrayBuffer to a String.
*
* @param buffer - Buffer to convert.
* @returns String.
*/
export default function arrayBufferToString(buffer: ArrayBuffer): string {
return String.fromCharCode.apply(null, Array.from(new Uint16Array(buffer)));
}
@sulco
sulco / theme.directive.ts
Created November 4, 2018 16:12
Angular theme directive
import { Directive, ElementRef, Input, OnChanges } from '@angular/core';
/**
* Usage:
* <mycomponent [dtTheme]="{'color-main': '#bada55'}"></mycomponent>
*/
@Directive({
selector: '[dtTheme]'
})
export class ThemeDirective implements OnChanges {
@arniebradfo
arniebradfo / any.component.html
Last active October 22, 2024 18:40
Angular *ngFor recursive list tree template
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
@shawndumas
shawndumas / logicGates.js
Last active February 21, 2024 11:53
Logic Gates (es6 version)
const logicGates = {
nand(a, b) {
return !(a && b);
},
not(a) {
return this.nand(a, a);
},
and(a, b) {
return this.not(this.nand(a, b));
},
@rxaviers
rxaviers / gist:7360908
Last active November 2, 2025 15:48
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: