Skip to content

Instantly share code, notes, and snippets.

View yjaaidi's full-sized avatar
💭
👨🏻‍🍳 helping you cook better apps

Younes Jaaidi yjaaidi

💭
👨🏻‍🍳 helping you cook better apps
View GitHub Profile
@yjaaidi
yjaaidi / ngx-light.html
Last active June 11, 2022 14:22
Tiniest Angular Setup Ever
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>👨🏻‍🍳🅰️ Ngx Light by Younes @ Marmicode.io</title>
<meta name="description" content="👨🏻‍🍳🅰️ Ngx Light" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script type="importmap">
{
"imports": {
@yjaaidi
yjaaidi / ngx-light-hello.html
Created June 11, 2022 14:23
Tinest Angular App
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>👨🏻‍🍳🅰️ Ngx Light by Younes @ Marmicode.io</title>
<meta name="description" content="👨🏻‍🍳🅰️ Ngx Light" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script type="importmap">
{
"imports": {
@yjaaidi
yjaaidi / switch-map-on-next.js
Created September 2, 2022 18:07
switchMapOnNext rxjs operator
import * as rx from 'rxjs';
const delays = [3000, 2000, 500];
const switchMapOnNext = (project) => (source) => {
return new rx.Observable((observer) => {
let previousSubs = new rx.Subscription();
const subscription = source.subscribe((value) => {
const result$ = project(value);
const currentPreviousSubs = previousSubs;