Skip to content

Instantly share code, notes, and snippets.

View nmvuong92's full-sized avatar
🎯
Focusing

Vượng Nguyễn nmvuong92

🎯
Focusing
View GitHub Profile
@nmvuong92
nmvuong92 / Fix Composer can't find mongodb extension.md
Last active September 5, 2018 06:00
Fix Composer can't find mongodb extension
composer require jenssegers/mongodb --ignore-platform-reqs

hoặc

composer install --ignore-platform-reqs
@nmvuong92
nmvuong92 / Blocking & Nonblocking IO.md
Last active September 4, 2018 09:43
Blocking & Nonblocking I/O

I/O?

  • Là quá trình giao tiếp
  • Đưa dữ liệu vào trả dữ liệu ra

BLOCKING vs NonBlocking

Blocking I/O

  • Yêu cầu thực thi một IO operation, sau khi hoàn thành thì trả kết quả lại. Process/Theard gọi bị block cho đến khi có kết quả trả về hoặc xảy ra ngoại lệ.

@nmvuong92
nmvuong92 / ES6 generator function.md
Last active September 4, 2018 04:59
ES6 Generator function

nó là gì?

Generator function là một loại function đặc biệt có thể đi vào, đi ra và thoát một số lần. Bạn có thể nghe mọi người mô tả nó là "một hàm có thể bị tạm dừng"

khác gì với function thông thường?

Sự khác biệt duy nhất cho đến nay là Generator function được định nghĩa với function* chứ không phải function.

@nmvuong92
nmvuong92 / Element type is invalid: expected a string for built-in components.md
Last active September 3, 2018 12:16
Fix lỗi Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Change your Package.json file at this line "react-router-redux": "next"

@nmvuong92
nmvuong92 / Làm thế nào để thêm SASS SCSS vào một dự án create-react-app.md
Last active September 3, 2018 04:22
Làm thế nào để thêm SASS/SCSS vào một dự áncreate-react-app

Eject

Cần phải chạy Eject vì điều này là cần thiết để chỉnh sửa thủ công các tệp cấu hình webpack.

npm run eject

Install SASS

cài đặt precompiler (trình biên dịch trước)

npm install sass-loader node-sass --save-dev
@nmvuong92
nmvuong92 / Tạo mới reactjs app.md
Last active September 3, 2018 03:45
Tạo mới reactjs app

0 cài đặt gói app-create-app cli để tạo ứng dụng reactjs chính thống từ trang chủ*

npm install -g create-react-app

1 KIỂM TRA ĐÃ CÀI ĐẶT create-react-app chưa?

create-react-app -V

=>1.5.2

@nmvuong92
nmvuong92 / Cài đặt create-react-app
Created September 3, 2018 03:12
Cài đặt create-react-app
npm install -g create-react-app
@nmvuong92
nmvuong92 / Add_Existing_Project_To_Git.md
Created February 9, 2018 04:02 — forked from alexpchin/Add_Existing_Project_To_Git.md
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init