Tools

MongoDB - Tutorial

Good tutorial video https://www.youtube.com/watch?v=pWbMrx5rVBE Handson Install on Ubuntu sudo su wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list apt update sudo apt install -y mongodb-org systemctl start mongodb Playground in local Docker container docker run -p 27017:27017 -d mongo:4.0-xenial Toolkit curl https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.3.0.deb -O sudo apt install ./mongodb-database-tools-ubuntu2004-x86_64-100.3.0.deb Mongo shell mkdir mongosh cd mongosh curl https://downloads.mongodb.com/compass/mongosh-0.8.3-linux.tgz -O tar -zxvf mongosh-0.

Bare Git repository with Gitosis

Install gitosis On Ubuntu20 Python 2!! https://github.com/tv42/gitosis/blob/master/README.rst https://www.howtoforge.com/setting-up-gitosis-on-ubuntu apt install -y python-setuptools git clone https://github.com/tv42/gitosis.git cd gitosis sudo python2 setup.py install sudo adduser \ --system \ --shell /bin/sh \ --gecos 'git version control' \ --group \ --disabled-password \ --home /srv/example.com/git \ git ssh-keygen -b 4096 sudo -H -u git gitosis-init < .ssh/id_rsa.pub sudo chmod 755 /srv/example.com/git/repositories/gitosis-admin.git//hooks/post-update client side git clone git@serverdomain:gitosis-admin.git Create user Put pubkey to gitosis-admin/keydir

SolrCloud - set up

Install Solr Install environment Ubuntu 20.04 Pre-installation Linux settings Create an user solr. sudo useradd -r -s /bin/bash solr Change several kernel parameters in /etc/security/limits.conf. solr hard nofile 65535 solr soft nofile 65535 solr hard nproc 65535 solr soft nproc 65535 Turn off swaps. sudo swapoff -a Relogin so that the change will takes a place. Install Java Install Java. sudo apt install -y openjdk-11-jdk Install ZooKeeper Install Apache ZooKeeper.

Setting up Apache ZooKeeper cluster

What is ZooKeeper (very rough) Apache ZooKeeper storage hierarchal structure. Refer to ZNode. https://de.slideshare.net/sauravhaloi/introduction-to-apache-zookeeper Install ZooKeeper My environment Ubuntu 20.04 Pre-installation Install java first. sudo apt update sudo apt upgrade -y sudo apt install -y openjdk-11-jdk Crete ZooKeeper user. sudo useradd -r -s /bin/bash zk Install ZooKeeper on nodes Download link https://zookeeper.apache.org/releases.html sudo su cd /opt curl https://mirror.netcologne.de/apache.org/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz -O tar xvf apache-zookeeper-3.6.2-bin.tar.gz mkdir /var/lib/zookeeper cd apache-zookeeper-3.6.2-bin cp conf/zoo_sample.cfg conf/zoo.

lsyncd - synchronize daemon

What’s lsyncd My understanding is, it’s kind of rsync daemon. Install On Ubuntu Install on source servers (no need to install on destination servers). apt update apt install lsyncd Set kernel parameter fs.inotify.max_user_watches. /etc/sysctl.conf # for lsyncd fs.inotify.max_user_watches = 8192000 Before running We should configure firewall so that the source server can SSH to destination servers. Here is my ssh snippets. Use (sync) Configuration Here is the configuration example. mkdir /etc/lsyncd vim /etc/lsyncd/lsyncd.

Set up my Vim

Install jellybeans I use a color scheme called “Jellybeans”. mkdir ~/.vim cd ~/.vim sudo yum install -y git git clone https://github.com/nanotech/jellybeans.vim mkdir colors mv jellybeans.vim/colors/jellybeans.vim ~/.vim/colors/jellybeans.vim vim ~/.vimrc colorscheme jellybeans set expandtab set tabstop=2 set softtabstop=2 set shiftwidth=2 set number syntax on set t_Co=256 set foldmethod=syntax Add the line into ~/.bashrc, TERM=xterm-256color vim plugin manager https://github.com/junegunn/vim-plug Install curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim Configure. https://github.com/junegunn/vim-plug/wiki/tutorial In ~/.vimrc call plug#begin('~/.

Easy search with browser (Lexico exmple)

Vivaldi (or Chromium or Chrome) setting Go to Preferences -> Search. Sample I use Lexico often to search the meaning of words (as dictionary). Name: Lexico Nickname: lex URL: https://www.lexico.com/en/definition/%s Check the Use POST method With this configuration, I can search the word, for example, “test” by type “lex test” in the browser’s URL box.

GPG

PGP and GPG PGP - Pretty Good Privacy GPG - GNU Privacy Guard oder GnuPG https://en.wikipedia.org/wiki/Pretty_Good_Privacy The Free Software Foundation has developed its own OpenPGP-compliant program called GNU Privacy Guard (abbreviated GnuPG or GPG). Install GPG on MacOS Installing homebrew first Refer to https://blog.ghostinthemachines.com/2015/03/01/how-to-use-gpg-command-line/ And install it. brew install gnupg Use GPG keygen Generate a key pair gpg --gen-key Real name: My Realname Email Address: foo@bar.com (Okay) (Enter the pass) As a default, the key type is RSA 2048.

Mermaid - Intro how to use

What is Mermaid? Mermaid is a sequence diagram generator written in JavaScript. https://github.com/mermaid-js/mermaid Not only sequence diagrams, but Mermaid can also generate simple graphs. Sequence diagram Here is the simple snippet for beginners (slightly changed from official sample). Mainroad syntax: sequenceDiagram participant Alice participant Bob Alice->>Bob: Hello John, how are you? Bob-->>Alice: Great! sequenceDiagram: I want to draw sequenceDiagram participant Alice: There is a member of our protocol whose name is Alice.