Skip to content

Instantly share code, notes, and snippets.

View trungpq163's full-sized avatar
🌸
こんにちは

Trung Phan trungpq163

🌸
こんにちは
View GitHub Profile
@anchan828
anchan828 / README.md
Last active May 1, 2024 04:26
This is an improvement to allow @nestjs/typeorm@8.1.x to handle CustomRepository. I won't explain it specifically, but it will help in some way. https://github.com/nestjs/typeorm/pull/1233

You need to provide some classes and decorators yourself to maintain the same style as typeorm@2.x.

1. EntityRepository -> CustomRepository

@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}

@ladifire
ladifire / ExampleComponent.tsx
Created January 3, 2022 03:58
Demonstrate how to use Error boundary component in Reactjs
import React from 'react';
import { withErrorBoundary } from 'components/common/MartyErrorBoundary';
export const ExampleComponent = () => {
return (
<div>
Component
</div>
);
@psteinroe
psteinroe / Dockerfile
Last active June 20, 2022 02:01
cd.yaml
FROM node:fermium-alpine AS builder
WORKDIR /app/builder
COPY . .
# https://github.com/nodejs/docker-node/issues/384#issuecomment-305208112
RUN apk --no-cache add --virtual native-deps \
git g++ gcc libgcc libstdc++ linux-headers make python && \
yarn global add --silent node-gyp &&\
yarn --silent && \
apk del native-deps
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active May 18, 2024 15:37
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

@soker90
soker90 / App.tsx
Last active June 21, 2022 07:11
Debounce hook
import { useEffect } from "react";
import { useDebounce } from "hooks";
const App = () => {
const debounce = useDebounce();
useEffect(() => {
debounce(() => {
console.log('Hello world')
@paulnguyen-mn
paulnguyen-mn / reactjs-interview-tips.md
Last active March 7, 2023 12:16
Bí kíp cho buổi phỏng vấn ReactJS thành công 🎉

Bí kíp cho buổi phỏng vấn ReactJS thành công 🎉

From unplash.com

AGENGA:

  1. Một vài lưu ý chung
  2. Ôn tập kiến thức JS/ReactJS
  3. Cày thuật toán, giải thuật
  4. Tìm hiểu về công ty mà mình xin ứng tuyển
@paulnguyen-mn
paulnguyen-mn / reactjs-learning-path-2020.md
Created June 25, 2020 15:46
Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🚀

Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🎉

  • Đôi tượng: mới bắt đầu học ReactJS mà không biết học những gì.
  • Yêu cầu kiến thức:
@paulnguyen-mn
paulnguyen-mn / git-end-to-end-commands.md
Last active June 9, 2022 03:42
Những lệnh git sử dụng từ lúc nhận task cho đến khi tạo PR 😍

GIT - CÁC LỆNH ĐƯỢC DÙNG TỪ LÚC NHẬN TASK CHO TỚI LÚC TẠO PR 🎉

0. Nhận task, ví dụ ở đây task có id là 123

  • Tí nữa, đọc thấy tạo nhánh có số 123 thì các bạn hiểu ngầm nó chính là taskId nhen.
  • Ví dụ team mình dev trên nhánh develop.

1. Lấy code mới nhất trên branch develop

@trungpq163
trungpq163 / gist:f39081fdba71f079e61e5fa4064d3b45
Created April 3, 2020 00:12 — 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:
@fictorial
fictorial / encode_decode_hmac.js
Created April 1, 2019 19:03
encode / decode with hmac for node.js
// note: encoded data is NOT encrypted
const crypto = require('crypto');
const secret = '20BBEBB8-DCC1-4544-AD32-7F3973CCED7A';
function createDigest(encodedData, format) {
return crypto
.createHmac('sha256', secret)
.update(encodedData)
.digest(format);