Skip to content

Instantly share code, notes, and snippets.

View PatrickNiyogitare28's full-sized avatar
:octocat:
Building & Mentoring

Patrick Niyogitare PatrickNiyogitare28

:octocat:
Building & Mentoring
View GitHub Profile
Table User {
Id uuid [pk]
FirstName varchar
LastName varchar
Email varchar
Phone varchar
Password varchar
Role Role
Status UserStatus
CreatedAt datetime [default: `now()`]
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'
import type { RootState } from 'src/store/store'
import { SuccessListAPIResponse } from 'src/types/api-response';
import { MessageCategory } from 'src/types/category';
import { msgCategoriesService } from '@services/msg-categories.service';

// declaring the types for our state
export type MsgCategoriesState = {
    categories: Array<MessageCategory>,
import axios from 'axios';
import {IResponse} from '@interfaces/IResponse';

const upload = async (file: File): Promise<IResponse> => {
    const UPLOAD_PRESET: string = (import.meta.env.VITE_CLOUDINARY_UNSIGNED_UPLOAD_PRESET as string);
    const CLOUDINARY_NAME: string = (import.meta.env.VITE_CLOUDINARY_CLOUDNAME as string);
    const CLOUDINARY_API_KEY: string = (import.meta.env.VITE_CLOUDINARY_API_KEY as string);
    const CLOUDINARY_SECRET: string = (import.meta.env.VITE_CLOUDINARY_SECRET as string);
    const CLOUDINARY_IMAGES_FOLDER: string = (import.meta.env.VITE_CLOUDINARY_IMAGES_FOLDER as string);
@PatrickNiyogitare28
PatrickNiyogitare28 / gist:992a3b705d8b0b26d97d9781d03767c9
Created September 28, 2022 18:08 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

Resolving Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

If you're trying to run git push origin main or basically accessing your remote git and you get the bellow error this blog is for you to get it resolved

error

remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
@PatrickNiyogitare28
PatrickNiyogitare28 / clean_code.md
Created April 26, 2021 05:42 — 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

How to define enums in Javascipt

Enumerations offer an easy way to work with sets of related constants. An enumeration, or Enum , is a symbolic name for a set of values. Enumerations are treated as data types, and you can use them to create sets of constants for use with variables and properties.

Natively javascript doesn't support enums but still you can implement enum in javascipt. One of the available ways is to defining an object and then freezing it after definition.

Basic stardard description of a Pull Request

Hi folks 🖐! I'm sharing the template of describing your PR. Most of the time people describe Pull requests in their way but the thing is that there is a stardard way of PR description, what I'm sharing today is a basic template of PR description. You can folk this out or copy to be used in your PR description. Thank you.

Mackdown