Skip to content

Instantly share code, notes, and snippets.

View whizyrel's full-sized avatar
🐹
Observing

Israel O. Oluwole whizyrel

🐹
Observing
View GitHub Profile
@whizyrel
whizyrel / album.service.ts
Created September 23, 2023 19:03 — forked from ikismail/album.service.ts
Retry failed HTTP requests in Angular | Immediate retry, delayed retry and retry with backoff
/**
* 1. Immediate retry
* 2. delayed retry
* 3. retry with backoff
*/
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { EMPTY, Observable, of, throwError } from "rxjs";
import {
@whizyrel
whizyrel / semantic-commit-messages.md
Created October 12, 2022 11:08 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@whizyrel
whizyrel / clean_code.md
Created September 13, 2022 08:17 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@whizyrel
whizyrel / mysql-docker.sh
Created August 2, 2021 10:19 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE