Skip to content

Instantly share code, notes, and snippets.

View brianpooe's full-sized avatar
😎
Working from home

Brian Pooe brianpooe

😎
Working from home
View GitHub Profile
@AlbertoBasalo
AlbertoBasalo / store.ts
Created October 19, 2022 09:41
A generic class to manage state in an asynchronous way.
import { BehaviorSubject, distinctUntilChanged, map, Observable } from "rxjs";
/**
* A generic class to manage state in an asynchronous way.
*/
class Store<T> {
/**
* @private field to store and notify state changes
* BehaviorSubject is a special type of Observable
* that keeps hold of the current value
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active June 20, 2025 17:53
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@lurumad
lurumad / Startup.cs
Created September 17, 2020 05:22
Add authentication to SwaggerUI
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
@jangbl
jangbl / index.js
Last active October 13, 2023 18:45
Session-based authentication in express.js
const express = require('express');
const session = require('express-session');
const redis = require('redis');
const connectRedis = require('connect-redis');
const app = express();
// if you run behind a proxy (e.g. nginx)
// app.set('trust proxy', 1);
@jimmywarting
jimmywarting / readme.md
Last active June 29, 2025 03:40
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active December 30, 2024 16:16
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH