Skip to content

Instantly share code, notes, and snippets.

@antruongnguyen
antruongnguyen / git-101-vi.md
Created July 16, 2024 06:22
Git 101 - Hướng dẫn sử dụng git bằng Tiếng Việt

Git 101 - Hướng dẫn sử dụng git bằng bằng dòng lệnh

Đây là bài viết dành cho người mới bắt đầu sừ dụng git, phù hợp cho học sinh, sinh viên, người mới ra trường, hoặc mới đi làm.

Yêu cầu:

  • Git đã được cài đặt trên máy.
  • Cửa sổ dòng lệnh (Terminal/CMD)

1. Git là gì?

Git là một hệ thống quản lý phiên bản phân tán (Distributed Version Control System - DVCS) được sử dụng để theo dõi sự thay đổi trong mã nguồn của phần mềm trong quá trình phát triển. Nó cho phép nhiều người làm việc trên cùng một dự án mà không gặp phải vấn đề xung đột mã nguồn.

@antruongnguyen
antruongnguyen / Simple HTTP Server.md
Created June 22, 2021 16:38
Create Simple HTTP Server on localhost using NodeJS, Python, or Docker

Create Simple HTTP Server on localhost

Use NodeJS

Use Python

  • Usage with Python v3 sudo python3 -m http.server 80 (need sudo for port 80 only)
@antruongnguyen
antruongnguyen / Code coverage.md
Created October 26, 2020 03:36 — forked from mems/Code coverage.md
Web frontend code coverage

Every line of code we write today will end up as someone’s legacy code.

Everything that you write is going to disappears some day

RUM Code coverage, chose a 1h timeframe (per day) where 1% traffic run that the test

JS coverage

FES javascript instrimentation visualization

@antruongnguyen
antruongnguyen / PowerUpTerminal.md
Created June 4, 2020 03:56
Power up the terminal using iTerm2 and Oh-my-zsh

Power Up Terminal

Requires

  • Supported OS: macOS, Linux
  • Shell: zsh
  • Softwares:
    • Git
    • iTerm2 https://www.iterm2.com/
    • Oh My Zsh https://ohmyz.sh/
@antruongnguyen
antruongnguyen / embedded-file-viewer.md
Created August 27, 2019 04:36 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@antruongnguyen
antruongnguyen / loading.css
Created July 30, 2019 07:38
CSS Loading Icon
.loading {
height: 40px;
width: 40px;
background: transparent;
border-radius: 50%;
border: 2px solid rgba(0, 0, 0, 0.3);
border-top: 2px solid #1d9af2;
animation: spinner 500ms linear infinite;
}
@antruongnguyen
antruongnguyen / xdebug_devilbox_phpstorm_postman.md
Created July 19, 2019 07:29 — forked from marcandreappel/xdebug_devilbox_phpstorm_postman.md
Using Xdebug on Devilbox with PhpStorm and Postman

Host OS

Tested on:

  • openSUSE 15.1 Leap
  • Fedora 30

Check before setup:

  • Accept in the firewall the port 9000 TCP

Docker

@antruongnguyen
antruongnguyen / firebase_realtime_db_in_javascript.js
Created January 16, 2019 09:36
Recap Firebase Realtime Database for Web
// <script src="https://www.gstatic.com/firebasejs/5.4.0/firebase.js"></script>
// Initialize Firebase
var project_id = "FIREBASE_PROJECT_ID";
var config = {
apiKey: "API_KEY",
authDomain: project_id + ".firebaseapp.com",
databaseURL: "https://" + project_id + ".firebaseio.com",
projectId: project_id,
storageBucket: project_id + ".appspot.com",
@antruongnguyen
antruongnguyen / Uninstall_JDK_on_macOS.md
Last active December 26, 2018 07:49
Uninstall the JDK on macOS

To uninstall the JDK, you must have Administrator privileges and execute the remove command either as root or by using the sudo(8) tool.

Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format: /Library/Java/JavaVirtualMachines/jdkmajor.minor.macro[_update].jdk

For example, to uninstall 8u6: rm -rf jdk1.8.0_06.jdk

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.

@antruongnguyen
antruongnguyen / kill_all_processes_with_name_macos.md
Created December 20, 2018 07:21
How to kill all processes with the same name on macOS Terminal

Use pkill

pkill -f <process_name>

Use killall

killall <process_name>