Category Archives: linux

CURL with time printed

cURL supports formatted output for the details of the request (see the cURL manpage for details, under -w, –write-out <format>). For our purposes we’ll focus just on the timing details that are provided. Times below are... Read More | Share it now!

uWSGI缓存框架

https://uwsgi-docs-zh.readthedocs.io/zh_CN/latest/Caching.html uWSGI包含了一个非常快速、全内存访问、零IPC、SMP安全、不断优化、高度可调的、键值存储的简单的“缓存框架”。单个uWSGI实例可以使用不同的设置,出于不同的目的,创建无限个不同的“缓存”。 创建一个“缓存” 要创建一个缓存,你可以使用 --cache2 选项。它接收指定缓存选项的参数字典。要有一个有效的缓存,你需要指定它的名字,以及它可以包含的项的最大数目。 uwsgi... Read More | Share it now!

htop

Most people familiar with Linux have used the top command line utility to see what process is taking the most CPU or memory. There’s a similar utility called htop that is much easier to use for normal tasks. The first great thing about htop... Read More | Share it now!

关于大内存页面 transparent_hugepage

Transparent Huge Pages (THP) are enabled by default in RHEL 6 for all applications. The kernel attempts to allocate hugepages whenever possible and any Linux process will receive 2MB pages if the mmap region is 2MB naturally aligned. The main kernel... Read More | Share it now!

在 Vim 中优雅地查找和替换

总有人问我 Vim 中能不能查找,当然能!而且是超级强的查找! 这篇文章来详细介绍 Vim 中查找相关的设置和使用方法。... Read More | Share it now!

apk add python not working

It will install python3 automatically with pip. python (version 2) has been decommissioned from latest packages. ... Read More | Share it now!

How to upload a file to Google Drive from the command line

I’ve been looking at several linux projects here recently, such as LibreNMS, and you’ll need to be sure you are backing them up. I wanted to quickly backup a compressed copy of my LibreNMS install and so I went looking for a super easy way to... Read More | Share it now!

Get video media information

Give mediainfo a try. On the command line type mediainfo input.mkv. For more detailed video information mediainfo --fullscan input.mkv. ... Read More | Share it now!

How to check if a variable is set in Bash?

where ${var+x} is a parameter expansion which evaluates to nothing if var is unset, and substitutes the string x otherwise. To check for non-null/non-zero string variable, i.e. if set, use It’s the opposite of -z. I find myself... Read More | Share it now!