Calibre Platform Support - 2022

Platform Identifiers for Calibre Install Files and Runtime Directories

Calibre provides different executables that are optimized for different Linux distributions, and each has its own platform identifier. The platform identifier is sometimes referred to as a VCO, which refers to a Vendor-CPU-OS combination. The platform identifier is first used to identify which install files should be downloaded. After installation the platform identifier and release version number are used to identify the Calibre runtime directory, generally referred to as a MGC_HOME tree. Each Calibre MGC_HOME tree can only be used with specific OS versions and must run on hardware that supports the minimum CPU instruction set identified for that MGC_HOME tree. Note that when using Calibre with distributed processing, the MGC_HOME trees on the master host and all remote hosts must all have the same platform identifier.

Read More

Calibre Platform Support -2022

Platform Identifiers for Calibre Install Files and Runtime Directories

Calibre provides different executables that are optimized for different Linux distributions, and each has its own platform identifier. The platform identifier is sometimes referred to as a VCO, which refers to a Vendor-CPU-OS combination. The platform identifier is first used to identify which install files should be downloaded. After installation the platform identifier and release version number are used to identify the Calibre runtime directory, generally referred to as a MGC_HOME tree. Each Calibre MGC_HOME tree can only be used with specific OS versions and must run on hardware that supports the minimum CPU instruction set identified for that MGC_HOME tree. Note that when using Calibre with distributed processing, the MGC_HOME trees on the master host and all remote hosts must all have the same platform identifier.

Read More

Linux Shell System Variables

These are special shell variables which are set internally by the shell and which are available to the user. Visit here for better understanding Linux shell system variables.

Variable Description
$0 The filename of the current script.
$n These variables correspond to the arguments with which a script was invoked. Here n is a positive decimal number corresponding to the position of an argument (the first argument is $1, the second argument is $2, and so on).
$$ The process ID of the current shell. For shell scripts, this is the process ID under which they are executing.
$# The number of arguments supplied to a script.
$@ All the arguments are individually double quoted. If a script receives two arguments, $@ is equivalent to $1 $2.
$* All the arguments are double quoted. If a script receives two arguments, $* is equivalent to $1 $2.
$? The exit status of the last command executed.
$! The process ID of the last background command.
$_ The last argument of the previous command.

Get Strings Within Commandline

I’ve got two methods to get strings or substrings within current Linux shell command-line. For instance, sometimes we want to get the file full path when source it in shell. Here are my ways to do so.

  1. Use command of lsof
    1
    2
    3
    set sourced_file = `/usr/sbin/lsof -p && -w | grep -oE "\s+\/.*\Sourced_Filename"`
    set relative_path = `dirname $sourced_file`
    set absolute_path = `chdir $relative_path && pwd`
  2. Use command of history
    1
    2
    3
    set sourced_file = `history 1 | sed -e 's/^.*source\ //g'`
    set relative_path = `dirname $sourced_file`
    set absolute_path = `chdir $relative_path && pwd`

Deploy Github Pages at Vercel

Accessing GitHub pages from China is pretty slow. Vercel has much better user experience although Vercel’s servers are located in oversea countries, same as GitHub servers. So many of bloggers in China migrate their static Blog site onto Vercel. To do the migration it’s quite simple. All you have to do are merely 3 steps.

  1. With your GitHub account create an account at https://vercel.com. It seems like you just sign-in Vercel with your GitHub account. By doing this your GitHub pages will be able to accessed from Vercel.
  2. Create a new project on your Vercel dashboard. The guide will take you to import your GitHub existing projects. Just select one and click “Import” button.
  3. Set your project name and click “Deploy” button. Keep all default settings. Now simply wait to see magical things happen.

By now the deployment process is done. If it succeeds colorful flowers will be scattered on your screen. If it fails you need to check the deployment status and building logs.

If your have your own domain name, you can also add your domain to point your site address.

Expand Tab in Emacs-Verilog Auto Code

When you use Emacs-verilog to generate code automatically, tabs are inserted instead of whitespace by default. For myself I prefer not to have tabs in my Verilog code at all, even for line indent or signal alignment. Then how to achieve this in Emacs auto code?

Simply add two lines in your verilog-mode.el as below. Yeah, it’s done and enjoy!

1
2
(setq-default tab-width 8)
(setq-default indent-tabs-mode nil)

Check out everything about Emacs-verilog at https://veripool.org/verilog-mode/.