Hiển thị tab Firefox trên nhiều dòng

  1. Truy cập about:config, bật tùy chọn toolkit.legacyUserProfileCustomizations.stylesheets.
  2. Truy cập about:support > Profile Directory > Open Directory. Cửa sổ thư mục profile sẽ bật ra.
  3. Trong thư mục profile, tạo thư mục chrome nếu chưa tồn tại.
  4. Trong thư mục chrome, tạo file userChrome.css.
  5. Copy nội dung từ file multi-row_tabs.css vào file userChrome.css.
  6. Khởi động lại Firefox.
firefox  css 

Bật Application Launcher trên Latte Dock bằng phím tắt Window

  • Bấm chuột phải vào dock > Layouts > Configure…
  • Trong cửa sổ Settings, chuyển tới tab Preferences
  • Trong mục Actions > Chọn Press ⌘ to activate Application Launcher

Hoặc

  • Mở file ~/.config/kwinrc lên và thêm đoạn sau:

    ...
    [ModifierOnlyShortcuts]
    Meta=org.kde.lattedock,/Latte,org.kde.LatteDock,activateLauncherMenu
    ...
    
  • Reload KWin:

    $ qdbus org.kde.KWin /KWin reconfigure
    

    Github QA

Tạo GPG key với text file

Tạo 1 file text tên là gpg_gen_key với đầy đủ thông tin cho việc tạo key:

Key-Type: 1
Key-Length: 2048
Subkey-Type: 1
Subkey-Length: 2048
Name-Real: My Name
Name-Email: [email protected]
Expire-Date: 0
Passphrase: secretpass

Tiến hành tạo key từ file text trên:

gpg --batch --gen-key gpg_gen_key
gpg 

NGINX Basic Authentication

Gói yêu cầu

  • Trên Debian: apache2-utils.

    sudo apt-get install apache2-utils
    
  • Trên Fedora: httpd-tools.

    sudo dnf install httpd-tools
    

Tạo file lưu trữ user:password

Tạo file /etc/nginx/.htpasswd là file chứa thông tin về người dùng và mật khẩu.

sudo htpasswd -c /etc/nginx/.htpasswd user1

Tùy chọn -c chỉ nên dùng nếu file chưa tồn tại nếu không nó sẽ ghi đè file đã có. Để thêm người dùng khác, ta chạy lệnh giống như trên nhưng bỏ tùy chọn -c.

sudo htpasswd /etc/nginx/.htpasswd user2
[Đọc tiếp]
nginx 

Bắt đầu với Mosh

Mosh là gì

Mosh là một công cụ thay thế cho SSH terminal.

Mosh không lắng nghe trên network port hay xác thực người dùng. Mosh client đăng nhập máy chủ thông qua SSH sau đó khởi chạy mosh-server trên máy chủ và kết nối với nó thông qua UDP.

[Đọc tiếp]
mosh  ssh 

Lấy patch file của một commit trên github

Để lấy patch file của một commit trên github, chúng ta chỉ cần thêm đuôi .patch vào sau đường link của commit đó (bỏ đi những tham số kiểu như ?diff=unified).

  • Cấu trúc của một đường link cho patch file sẽ là: https://github.com/<owner>/<repo>/commit/<commit_id>.patch

  • Ví dụ đường link để lấy patch file cho commit
    https://github.com/dothanhtrung/godebian/commit/cf0495a9e2f5996fbb3e00f21e92b9aa259a6c2b

    https://github.com/dothanhtrung/godebian/commit/cf0495a9e2f5996fbb3e00f21e92b9aa259a6c2b.patch

github