It seems Thunderbird sends out my private/lan IP to the SMTP server. For example, in an Email sent out by Thunderbird, the header contains Received: from [192.168.1.2] (example.com [1.2.3.4]) by mail.example.com (Postfix) with ESMTPSA id 92CD297DEA; It is fine that the SMTP server records the public IP (1.2.3.4) as it is what it sees. But
Read more
Category: QA
Questions and answers.
How to list start and end sectors of a partition by parted in Linux?
Posted onHow to list start and end of a partition by the sectors in parted on Linux? The default behavior seems be listing the start and end by bytes in parted. # parted /dev/sdc print Model: Innostor IS888 ext. HDD (scsi) Disk /dev/sdc: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End
Read more
Making Evolution Not Wrap Lines in Composed Emails
Posted onEvolution seems wrap long lines automatically in “Plain Text” mode. How to make Evolution not wrap lines in composed Emails? Evolution does not have (so far) “Flowing Text” mode where “the text is soft broken at the composer edge, but those soft breaks aren’t translated to hard breaks when the mail is sent” ( Reference:
Read more
How to enable Email address auto completion in Evolution?
Posted onDoes Evolution support automatic email address filling/completing in the “To” or “CC” fields which is commonly seen in other Email clients such as Thunderbird. Is is possible and how to enable Email address auto completion in Evolution? Evolution supports the contact autocompletion. To enable it, do as follows in Evolution. In Evolution Preferences dialog, in
Read more
How to search history commands very effectively in bash shell command line?
Posted onHow to search history commands very effectively in bash shell command line? Just enter CTRL+r The function of above is: (reverse-i-search)`’: It is very fast and efficient.
Why I cannot login remote server with its root
Posted on# ssh root@192.168.122.96 root@192.168.122.96’s password: Permission denied, please try again. Do according to [1]. NOTE: on Ubuntu, remember to restart ssh service like this “sudo restart ssh”. [1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/v2v_guide/preparation_before_the_p2v_migration-enable_root_login_over_ssh
How to apply the Email sort order to all folders in Evolution?
Posted onEvolution’s default Email sort order is not very convenient, at least to me. How to apply the settings of sort order for a folder to all folders in Evolution? Manually setting the email sort order for each dir is tedious. Evolution has a function to “apply the same view settings to all folder” so that
Read more
How to check CPU working frequency in iOS on iPhone?
Posted onHow to check CPU working frequency in iOS on iPhone, such as my iPhone 6? The Litum Info Lite free app (Litum Info full version app) can show you the info of CPU including its frequency. The CPU frequency: You can find the CPU info page from the menu:
How to iterate all dirs and files in a dir in C++?
Posted onHow to iterate all dirs and files in a dir in C++? To open a dir, we can use opendir() to open a directory stream. DIR *opendir(const char *name); Then we can use readdir() to iterate the directory stream. struct dirent *readdir(DIR *dirp); Here is an example C++ program using these 2 library functions. #include
Read more
How to get a path’s mtime in C++ on Linux?
Posted onHow to get a path’s mtime in C++ on Linux? The path can be a file or a dir. You may call the standard library function lstat() for the file or dir under the path. int lstat(const char *pathname, struct stat *statbuf); From the returned stat struct, there is a field st_mtim which is the
Read more
How to change the default target of `make`?
Posted onThe default target of make is the first target. But can I change the default target in Makefile and how to change the default target of make? The default goal of make is the first target whose name does not start with ‘.’ if .DEFAULT_GOAL is not set. Ref: make manual. To set the default
Read more
How to test whether a given path is a directory or a file in C++?
Posted onHow to test whether a given path is a directory or a file in C++? For example, pathtype(“/”) –> “a dir” pathtype(“/tmp/file.txt”) –> “a file” # if there is a file file.txt pathtype(“/tmp/dir.txt”) –> “a dir” # if there is a dir named dir.txt The type of a file/dir can be found out using lstat()
Read more
What are the differences between BIOS and UEFI?
Posted onBIOS: Basic Input Output Systems UEFI: Unified Extensible Firmware Interface UEFI is the advanced BIOS, which solves some limitations in BIOS such as 1, 16-bit processor mode; 2, 1 MB addressable space and PC AT hardware. References: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
how to list and delete shared memory in linux?
Posted onhow to list and delete shared memory in linux? List all shared memories in your Linux Systems > $ ipcs -m Delete specific one > $ ipcrm -M 0x0001869c
How to get one process’s port number?
Posted onIf we want to check one program on one remote server, we need to know this server’s IP and port number. How to get this program’s port number in the remote server? # netstat -tulpn Remember to run this program with root permission since some programs can only be accessed by root.
How to get a server’s serial number remotely?
Posted onHow to get a server’s serial number remotely? Tested on Linux Ubuntu 14.04 Trusty > sudo apt-get install dmidecode > sudo dmidecode -s system-serial-number I tried this on several Linux boxes with CentOS 7 and it seems A physical node returns a string like System Serial Number. A KVM VM returns a string like 3fd12bba-12d4-48c7-875a-7a5f57ed8a9a.
Read more
What are the differences between NUMA architecture and SMP architecture?
Posted onNUMA Architecture: Non-Uniform Memory Access architecture. SMP: Symmetric Multiprocessing architecture. In a Symmetric Multiprocessor, the architectural “distance” to any memory location is the same for all processors, i.e. “symmetric”. In a NonUniform Memory Access machine, each processor is “closer” to some memory locations than others; i.e. memory is partitioned among them Asymmetrically. From my understanding,
Read more
Latex is stuck with a strange problem, see more information for details.
Posted on$ make pdflatex main.tex This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted write18 enabled. entering extended mode (./main.tex LaTeX2e <2016/02/01> Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./usenix.sty (/usr/share/texlive/texmf-dist/tex/latex/psnfss/mathptmx.sty)) (/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty) (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg) (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
Read more
Why do I need to run latex/bibtex three times to make everything look good?
Posted onWhy does latex need to be executed 3 times like following? pdflatex main.tex bibtex main pdflatex main.tex pdflatex main.tex Copied from https://tex.stackexchange.com/questions/53235/why-does-latex-bibtex-need-three-passes-to-clear-up-all-warnings. The reason is as follows: 1, At the first latex run, all cite{…} arguments are written in the file document.aux. 2, At the bibtex run, this information is taken by bibtex and the
Read more
How can I login without password and run command in server at a local machine remotely?
Posted onLogin without PWD is fast and efficient. Running commands in server from local machine also have these benefits. login without PWD: add PC A’s public key to PC B’s authorized keys. > a@A:~> cat .ssh/id_rsa.pub | ssh b@B ‘cat >> .ssh/authorized_keys’ > b@B’s password: Run command remotely ssh root@MachineB “ls” NOTE: running commands remotely is
Read more