Wednesday, November 28, 2018

CTRL-C Stopped Working on Linux Terminal

I remotely logged in a CentOS 7.5 box via PuTTY. However, somehow, CTRL-C stopped working. It turns out that CTRL-C was being trapped, which we could examine using the trap command, e.g.,


trap -- '' SIGINT
trap -- '' SIGQUIT
trap -- '' SIGTSTP
trap -- '' SIGTTIN
trap -- '' SIGTTOU

To remove CTRL-C, i.e., SIGINT from this list, we can issue a command,

trap - SIGINT

which can be placed in the shell's profile, e.g., for bash, in $HOME/.bash_profile.

Installing pdftk in Ubuntu 18.04 Bionic

The pdftk package is reported missing from Ubuntu 18.04 Bionic. To me, the easiest way to install it out of a few suggested methods is as follows,



sudo snap install pdftk


Read more about snap here.

Sunday, November 25, 2018

Compile and Install HandBrakeCLI on Centos 7

I followed the following instructions,
The compilation and installation were successful. Although it continues and seems to run fine, HandBrakeCLI complains,

Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1

Wednesday, November 14, 2018

DTV Reception Maps

FCC has a Web site that shows receptions of Digital Television signal receptions giving an address. The address is,

dtv.gov/maps

Wednesday, October 31, 2018

FreeNas Plugins: "No Entry Has Been Found"?

A FreeNas system (FreeNAS-11.1-U6) reports "No entry has been found" on its Web interface. However, running pbi_browser seems to yield the list of plugins, for instance,


$ sudo /usr/local/sbin/pbi_browser  --viewall
Using RepoID: 001
Listing all available PBIs
------------------------------------
Application: CouchPotato
Version: autoupdate.9_5
Category: Network - P2P
Created: 20160212 060001
RootInstall: NO
Arch: amd64
Author: RuudBurger
URL: https://couchpota.to/
License: GPLv3
Type: Graphical
Keywords: net,p2p,share,nzb
Icon: /var/db/pbi/repo-icons/a5a51ab301916fcacfa9029fc96adff2-CouchPotato.png
Description: An automatic NZB and torrent downloader

To install this PBI:
# pbi_add --rArch amd64 --repo 001 -r CouchPotato

------------------------------------
Application: Emby
Version: 3.3.1.0
 
The solution that worked for me is simply to reboot the system.

Friday, August 10, 2018

Quering Computer's Serial Number

A computer's serial number may be printed on the back of the computer. However, it is inconvenient to locate it while the computer is on. We can query a computer's serial number using a command while the computer is on.

On Windows:

wmic bios get serialnumber

On Linux:

sudo lshw

Thursday, May 3, 2018

Breaking Long URL in LaTeX Documents

Sometimes we wish to break a long URL in a LaTeX document.  I am among many people who have struggled with this. The following summarizes the answers I found online,

  1. Pass hypens to the url package that is referenced in the hyperref package, e.g.,

    PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
      
  2. However, the above would not work when the long URL has hyphens to avoid confusion by design. To break a long URL that has hyphens, we can use

    \usepackage[hyphenbreaks]{breakurl}
    

  3. In the above, LaTeX works hard and attempts to break the long URL at some location. If the location is not to our liking, we add the \sloppy command right before the reference to an URL, e.g.,

    \sloppy
    \url{a-very-long-and-awkward-URL-with-many-hyphens}
    
The above is the summaries of the following two discussions,
  1. How to break long url in an item
  2. Forcing linebreaks in \url
Great discussions, folks. Thanks.