Home
Khuong Dev
Cancel

Useful Linux and Unix commands

Debian/Ubuntu Useful Commands Check OS version cat /etc/os-release Search text from terminal grep -rnwi '/path/file.js' -e 'keyword_not_case_sensitive' Show some logs, contents from line X to ...

Git Tips

Tips Everyday Git in twenty commands or so git help everyday Show helpful guides that come with Git git help -g Search change by content git log -S'<a term in the source>' Show changes ...

Suppress Startup log in NestJS

Example // main.ts import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { bootstrapLogger } from './bootstrap-logger'; ... const app = await NestFactory....

Học Javascript qua các câu hỏi phỏng vấn

Cơ bản 1. Closure là gì? Closure là một dạng function nằm trong một function khác. Function bên trong có quyền truy cập vào scope (phạm vi) và các tham số của function bên ngoài ngay cả khi functi...

Install Git on Linux and Unix

Install Debian/Ubuntu For Ubuntu sudo add-apt-repository ppa:git-core/ppa sudo apt update sudo apt install git Alpine sudo apk add git References Download for Linux and Unix

Fetch API on Javascript

POST method async function postData(url = '', data = {}) { // Default options are marked with * const response = await fetch(url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mod...

Postman on Linux

Install Postman Install by Snap sudo snap install postman Uninstall Postman If you use Snap: sudo snap remove postman References Installing and updating

UUID in NodeJS

UUID (Universally Unique IDentifier) crypto - Module was added from Node.js 14.17.0 const crypto = require("crypto"); console.log(crypto.randomUUID()); uuid module: const uuid = require("uui...

UUID in Javascript

UUID (Universally Unique IDentifier) function uuid() { var temp_url = URL.createObjectURL(new Blob()); var uuid = temp_url.toString(); URL.revokeObjectURL(temp_url); return uuid.substr(uuid...

Converting text to speech with Javascript

API Web Speech & Demo function speak (message) { var msg = new SpeechSynthesisUtterance(message) var voices = window.speechSynthesis.getVoices() msg.voice = voices[0] window.speechS...