Skip to content

Instantly share code, notes, and snippets.

src
├─ app
│ ├─ API (Module)
│ │ ├─ main (Folder)├─ Base(provider)
│ │ | ├─ licenses
| | │ ├─ permisstion
│ │ ├─ api (Base)
│ │ └─ ...
│ │
│ ├─ Service (All service)
@nguyentu9
nguyentu9 / redis_cheatsheet.bash
Created July 20, 2022 09:03 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@nguyentu9
nguyentu9 / debug.ts
Created April 30, 2022 16:04
debug rxjs
export enum RxJsLoggingLevel {
TRACE,
DEBUG,
INFO,
ERROR
}
let rxjsLoggingLevel = RxJsLoggingLevel.INFO;
export function setRxjsLoggingLevel(level: RxJsLoggingLevel) {
@nguyentu9
nguyentu9 / introrx.md
Created April 24, 2022 14:08 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<input type="file" class="file-upload" onchange="console.log(event.target.files)">
@nguyentu9
nguyentu9 / table-of-contents.md
Created April 15, 2022 06:30 — forked from isaacplmann/table-of-contents.md
Advanced Angular Patterns
@nguyentu9
nguyentu9 / rxjs-and-hooks.md
Created March 12, 2022 12:59
RXJS and Hooks

RXJS and Hooks, a most unlikely union

State management is hard. It's one of those things there are a lot of great solutions out there for in the Javascript library ocean, but none are a 1-size-fits-all, especially when it comes to approaching medium-to-large size apps with some semblance of sanity. I'd like to share some of the things we've learned here at Reonomy in our heroic rewrite of our old Angular 1.7 app to a new React one, and I'd like to particularly focus on how we found a way to get hooks and observables to play nice with each other (audience gasps). I know, a crazy thought.

The ideal world is a totally self-enclosed component

Isn't it a beautiful thing when a component does one thing, does it well, can be placed anywhere, and manages only its own state? Maybe it even has its own backend API with its own CRUD definitions, neatly Typed. These are the kinds of components you reread your own GitHub pull request code for over and over, at the end of the day, accompanied by a glass of whiskey

@nguyentu9
nguyentu9 / flexbox.scss
Created December 25, 2021 17:56 — forked from richardtorres314/flexbox.scss
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@nguyentu9
nguyentu9 / nx-structure-angular-nestjs.md
Created November 22, 2021 21:00 — forked from trungvose/nx-structure-angular-nestjs.md
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

static int modInverse(int a, int n)
{
int i = n, v = 0, d = 1;
while (a>0) {
int t = i/a, x = a;
a = i % x;
i = x;
x = d;
d = v - t*x;
v = x;