Move Wordpress to new server with new domain

  1. Backup all file system
  2. Backup database
  3. Replace old domain to new domain in backup database file
  4. If the home directory is different on new server, we need to replace the home directory value in database file as well. Also we need to use grep to find hardcode in backup files and fix it.
Read More

Fix Github pages issues

  • Error: GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
    1. Create personal access token on Github
    2. Add the following code in .bash_profile
        export JEKYLL_GITHUB_TOKEN=<your token here>
      
    3. Run following commond or Logout and logon again.
        . ~/.bash_profile
      
Read More

NoSQL Databases

Types of NoSQL Databases

  • Document store types ( MongoDB and CouchDB)
  • Key-Value store types ( Redis and Volgemort)
  • Column store types ( Cassandra)
  • Graph store types ( Neo4j and Giraph)
Read More

Run Docker inside LXD

To run Docker inside LXD, we need to change the security.nesting as true.

lxc launch ubuntu-daily:16.04 docker -c security.nesting=true

or

lxc config set docker security.nesting true
lxc restart docker
Read More

位操作基础篇之位操作全面总结

Title: 位操作基础篇之位操作全面总结
Author: MoreWindows
E-mail: morewindows@126.com
KeyWord: C/C++ 位操作 位操作技巧 判断奇偶 交换两数 变换符号 求绝对值 位操作压缩空间 筛素数 位操作趣味应用 位操作笔试面试

Read More

Italic fonts in iTerm2 tmux and vim

Run following command to fix italic fonts

{ infocmp -1 xterm-256color ; echo -e "\tsitm=\\E[3m,\n\tritm=\\E[23m,"; } > xterm-256color.terminfo
tic xterm-256color.terminfo
rm xterm-256color.terminfo
Read More

Setup Manjaro Xfce Desktop

Enable touchpad tap to click

  1. Install xorg-xinput via Package Manager
  2. Query touchpad device id
    xinput list
    

    Output example:

    ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
    ⎜   ↳ Sony Vaio Jogdial                       	id=7	[slave  pointer  (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad              	id=14	[slave  pointer  (2)]
    ⎜   ↳ Logitech USB Receiver                   	id=12	[slave  pointer  (2)]
    ⎜   ↳ Logitech USB Receiver                   	id=11	[slave  pointer  (2)]
    ⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
     ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
     ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
     ↳ Video Bus                               	id=8	[slave  keyboard (3)]
     ↳ Sony Vaio Jogdial                       	id=15	[slave  keyboard (3)]
     ↳ Sony Vaio Keys                          	id=6	[slave  keyboard (3)]
     ↳ Power Button                            	id=9	[slave  keyboard (3)]
     ↳ Logitech USB Receiver                   	id=16	[slave  keyboard (3)]
     ↳ UVC Camera (05ca:18b5)                  	id=10	[slave  keyboard (3)]
    
  3. List TouchPad properties
    xinput list-props 14
    

    Output example:

    Device 'SynPS/2 Synaptics TouchPad':
     Device Enabled (142):	1
     Coordinate Transformation Matrix (144):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
     libinput Tapping Enabled (295):	0
     libinput Tapping Enabled Default (296):	0
     libinput Tapping Drag Enabled (297):	1
     libinput Tapping Drag Enabled Default (298):	1
     libinput Tapping Drag Lock Enabled (299):	0
     libinput Tapping Drag Lock Enabled Default (300):	0
     libinput Tapping Button Mapping Enabled (301):	1, 0
     libinput Tapping Button Mapping Default (302):	1, 0
     libinput Accel Speed (281):	0.000000
     libinput Accel Speed Default (282):	0.000000
     libinput Natural Scrolling Enabled (277):	0
     libinput Natural Scrolling Enabled Default (278):	0
     libinput Send Events Modes Available (262):	1, 1
     libinput Send Events Mode Enabled (263):	0, 0
     libinput Send Events Mode Enabled Default (264):	0, 0
     libinput Left Handed Enabled (286):	0
     libinput Left Handed Enabled Default (287):	0
    ......
    
  4. Enable tap to click
    xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1
    
  5. Add command in step 4 to .xsession file to make sure enable tape to click after reboot
Read More