Skip to content

Instantly share code, notes, and snippets.

View killan's full-sized avatar

Jehan Bihin killan

View GitHub Profile
@killan
killan / map-element-mapper.ts
Created December 17, 2023 22:43
Custom RxJs Pipe Object to Array
export function MapElementMapperPipe<T>(source: Observable<T>): Observable<MapElement[]> {
return new Observable<MapElement[]>(subscriber => {
return source.subscribe({
next(value) {
const mapElements: MapElement[] = []
Object.keys(value as Object).forEach((type) => {
mapElements.push({
name: type,
items: (value as any)[type],
@killan
killan / tiptap-map-loops.ts
Last active October 12, 2023 12:02
TipTap JSONContent mapLoops
export type PdfMap = { [key: string]: string | boolean | PdfMap[] }
export enum JSONContentType {
Heading = "heading",
Paragraph = "paragraph",
Text = "text",
BulletList = "bulletList",
OrderedList = "orderedList",
ListItem = "listItem",
HardBreak = "hardBreak",
@killan
killan / k-pdf.ts
Last active June 29, 2023 10:29
jsPDF Goo's base
import { jsPDF } from "jspdf";
export interface Margins {
left: number
right: number
top: number
bottom: number
}
export interface TableColumns {
@killan
killan / FieldBaseComponent.ts
Created February 16, 2021 09:26
Angular 11 Field base to extends
import {
AfterViewInit,
Component, ElementRef,
Input,
OnInit, Renderer2,
ViewChild,
ViewContainterRef
} from "@angular/core";
@Component({
@killan
killan / bs-row.ts
Created February 9, 2021 14:21
Angular 11 encapsulation system
import {
Component,
ComponentFactoryResolver,
ComponentRef,
Directive, ElementRef,
Input, OnInit, Renderer2,
TemplateRef,
ViewContainerRef
} from "@angular/core";
@killan
killan / hp alm php curl.md
Last active August 29, 2015 14:27
Using HP ALM REST API with PHP and cURL with XML format

Using HP ALM REST API with PHP and cURL with XML format