Skip to content

Instantly share code, notes, and snippets.

View trangnth's full-sized avatar
🐄
love heals all

Trang Nguyen trangnth

🐄
love heals all
  • University of Engineering and Technology
  • Hanoi, Vietnam
View GitHub Profile
@trangnth
trangnth / type-vietnamese-on-ubuntu.md
Created June 26, 2025 01:54 — forked from lelinhtinh/type-vietnamese-on-ubuntu.md
Gõ Tiếng Việt trong Ubuntu

Gõ Tiếng Việt trong Linux

Ghi chú cách dùng IBus Bamboo để gõ Tiếng Việt mà không bị lỗi gạch chân như các bộ gõ khác.

Cài đặt

sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt-get update
sudo apt-get install ibus ibus-bamboo --install-recommends
@trangnth
trangnth / graylog_token.txt
Created September 28, 2023 04:27 — forked from joschi/graylog_token.txt
Graylog access token login
# Create an access token for user "admin" with name "test-1234"
# POST /users/{username}/tokens/{name}
$ curl -i -u admin:admin -H 'Accept: application/json' -X POST 'http://127.0.0.1:12900/users/admin/tokens/test-1234?pretty=true'
HTTP/1.1 200 OK
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Content-Type: application/json
Date: Mon, 08 Aug 2016 12:12:09 GMT
Content-Length: 139
{
@trangnth
trangnth / ubuntu_update_booting_kernel.md
Created August 28, 2023 02:51 — forked from chaiyujin/ubuntu_update_booting_kernel.md
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@trangnth
trangnth / linux-kill-pts.md
Created March 14, 2022 07:31 — forked from holmberd/linux-kill-pts.md
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
@trangnth
trangnth / rspamd-whitelisting.md
Created December 2, 2021 09:20 — forked from ThomasLeister/rspamd-whitelisting.md
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
@trangnth
trangnth / mailserver-howto.md
Created November 2, 2021 08:21 — forked from ibqn/mailserver-howto.md
Email server based on Dovecot, Postfix, MySQL, Rspamd and Debian 9 Stretch

Email server based on Dovecot, Postfix, MySQL, Rspamd and Debian 9 Stretch

MySQL database setup

Install MariaDB as a database management system DBMS

sudo apt install mariadb-server

Create a new database named srvmail for a mail server:

@trangnth
trangnth / kafkacat.md
Created June 7, 2021 03:16
kafka_note
  • list messages trong 1 partition
kafkacat -b 10.5.69.6:9092 -t imap-2 -p 1
  • Metadata listing:
root@trangnth-kafka:/opt/confluent# kafkacat -L -b 10.5.6.6:9092 -t imap-2 
Metadata for imap-2 (from broker 1: 10.5.6.6:9092/1):
@trangnth
trangnth / RabbitMQ.md
Last active June 4, 2021 04:10
RabbitMQ

upgrade rabbitmq từ 3.6.x -> 3.8.16

backup lại user password

Listing users
monitor [monitoring]
openstack       [None]
guest   [administrator]
@trangnth
trangnth / header_filter_by_lua_example.md
Created April 28, 2021 09:40 — forked from ejlp12/header_filter_by_lua_example.md
nginx, openresty, transform/modify response body, header_filter_by_lua
@trangnth
trangnth / auth.pl
Created April 27, 2021 08:42 — forked from mmriis/auth.pl
IMAP/POP3 proxy authentication script for nginx. See http://www.whatastruggle.com/nginx-as-an-imappop3-proxy-part-2.
#!/usr/bin/perl
use Digest::HMAC_MD5 qw/ hmac_md5_hex /;
use DBI;
use URI::Escape;
use CGI;
print "Content-type: text/html\n";
my $q = CGI->new;