Skip to content

Instantly share code, notes, and snippets.

View tanhit243's full-sized avatar
💭
I may be slow to respond.

Vu Tuan Anh tanhit243

💭
I may be slow to respond.
View GitHub Profile
@tanhit243
tanhit243 / gist:cf7dbec0e08af205ecb805e8d1660499
Created December 25, 2021 03:44 — forked from mrtns/gist:78d15e3263b2f6a231fe
Upgrade Chrome from Command Line on Ubuntu
# Install
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# Update
Kiểm tra model có bị lỗi abc trên thuộc tính xyz trong rails
model.errors.of_kind? :xyz, :abc //true or false
# Show firewall
sudo ufw status verbose
# Open port
Nếu bạn muốn mọi người trên internet truy cập được vào máy chủ của bạn thì bạn cần mở port trong firewall để cho phép họ truy
thông qua port vừa mở.
sudo ufw allow 22/tcp
# List open port