Create folder with case-insensitive file name on Linux
Posted on map[Count:June 15, 2022]
• Other languages: Tiếng Việt
Install ciopfs
-
Get source code from https://github.com/martanne/ciopfs.
-
Install dependencies.
Fedora:
$ sudo dnf install make gcc fuse-devel glib2-devel libattr-devel
Debian:
$ sudo apt install make gcc libfuse-dev libglib2.0-dev libattr1-dev
-
Build and install.
[Read More]
Install AMDGPU HiP, OpenCL on Fedora 36
Posted on map[Count:June 14, 2022]
• Other languages: Tiếng Việt
-
amdgpu installer can be get from https://www.amd.com/en/support. Just select your right card.
-
Download Radeon™ Software for Linux® installer version … for RHEL/CentOS 9.0.
You will get a rpm file: amdgpu-install-....el9.noarch.rpm
.
[Read More]
Raspberry Pi 4 as Routed Wireless Access Point
Posted on map[Count:May 8, 2022]
• Other languages: Tiếng Việt
+- RPi -------+
+---+ 192.168.1.2 | +- Laptop ----+
| | WLAN AP +-))) (((-+ WLAN Client |
| | 192.168.3.1 | | 192.168.3.2 |
| +-------------+ +-------------+
+- Router ----+ |
| Firewall | | +- PC#1 ------+
(Internet)---WAN-+ DHCP server +-LAN-+---+ 192.168.1.3 |
| 192.168.1.1 | | +-------------+
+-------------+ |
| +- PC#2 ------+
+---+ 192.168.1.4 |
+-------------+
[Read More]
Get actual elapse time in CPP
Posted on map[Count:October 13, 2021]
• Other languages: Tiếng Việt
#include <chrono>
int main() {
std::chrono::time_point <std::chrono::system_clock, std::chrono::duration<double, std::milli>> then = std::chrono::high_resolution_clock::now();;
// ... do something ...
std::chrono::time_point <std::chrono::system_clock, std::chrono::duration<double, std::milli>> now = std::chrono::high_resolution_clock::now();;
double elapseTimeInMS = (now - then).count();
return 0;
}
Shorter:
#include <chrono>
using namespace std;
int main() {
auto then = chrono::high_resolution_clock::now();
// ... do something ...
auto now = chrono::high_resolution_clock::now();
double elapseTimeInMS = chrono::duration<double, milli>(now - then).count();
return 0;
}
Get started with GStreamer - Command line
Posted on map[Count:October 10, 2021]
• Other languages: Tiếng Việt
This is about GStreamer on Linux.
[Read More]
[Linux] Adding page number to PDF file in terminal
Posted on map[Count:September 29, 2021]
• Other languages: Tiếng Việt
Note: You will lose all the links (hyperlink, internal-link) in PDF with this way
Create latex file numbered.tex:
[Read More]
Firefox tabs in multiple rows
Posted on map[Count:August 9, 2021]
• Other languages: Tiếng Việt

- Go to about:config, enable config
toolkit.legacyUserProfileCustomizations.stylesheets
.
- Go to about:support >
Profile Directory
> Open Directory
.
Firefox profile directory will be openned in new window.
- In your profile directory, create folder
chrome
if not exist.
- Go to folder
chrome
, create file userChrome.css
.
- Copy content from multi-row_tabs.css
into
userChrome.css
.
- Restart Firefox.
Active Application Launcher on Latte Dock by Super button
Posted on map[Count:May 29, 2020]
• Other languages: Tiếng Việt
- Right click on the dock > Layouts > Configure…
- In Settings window, go to Preferences tab
- In Actions section > Tick Press ⌘ to activate Application Launcher

Or
Generate GPG key non-interactively
Posted on map[Count:January 31, 2020]
• Other languages: Tiếng Việt
Put information for gen key in a text file, eg. gpg_gen_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
Gen key with above text file:
gpg --batch --gen-key gpg_gen_key
NGINX Basic Authentication
Posted on map[Count:January 30, 2020]
• Other languages: Tiếng Việt
Required package
Create password file
Run with -c
option if /etc/nginx/.htpasswd
does not exist:
sudo htpasswd -c /etc/nginx/.htpasswd user1
If .htpasswd
already exists, don’t use -c
option or file will be overwritten.
To add more user to password file.
sudo htpasswd /etc/nginx/.htpasswd user2
[Read More]