linux-based regular expressions, shell-based, file lookup and compression

1.shell programming shows basic information of computer and basic script. Only for version 6.7. COLOR="\033[1;36m" COLOREND="\033[0m" echo -e "CPU type is $COLOR `lscpu |grep 'Model name'|tr -s ' '|cut -d: -f2`$COLOREND" echo -e "Disk space is $COLOR `lsblk |grep 'disk' |tr -s ' '|cut -d' ' -f4|head -n 1` $COLOREND" echo -e "Memory size is $C ...

Posted by Elizabeth on Sat, 03 Aug 2019 00:13:30 -0700

Design mode and python implementation

Design Patterns and Python Implementation   What is the design pattern? Christopher Alexander: "Each pattern describes a problem that is recurring around us and the core of the solution to that problem.This allows you to use the program again and again without having to repeat your work." Design patterns are summarized a ...

Posted by artied on Fri, 02 Aug 2019 19:40:21 -0700

A thorough understanding of kubernetes CNI

Off-line installation packages for various versions of kubernetes CNI interface is very simple, especially some novices must overcome the fear, and I explore unexpectedly, this paper combines theory and practice, read down carefully will be very thorough understanding of the principle.<!--more--> Environmental Introduction When we instal ...

Posted by daglasen on Fri, 02 Aug 2019 03:48:39 -0700

Apache Spark Progressive Learning Tutorial: Spark Cluster Deployment and Running

Catalog First, Preface 1.1 Cluster Planning 1.2 Pre-condition 1.3 Installation Pack Download II. Installation and deployment 2.1. Unzip and modify configuration files 2.2 Copy files to two other machines 3. Operation and testing 3.1 Start Cluster 3.2 Start spark-shell connection cluster 3. ...

Posted by zuhalter223 on Fri, 02 Aug 2019 02:32:40 -0700

zabbix monitors printers and automatically updates monitoring items

It is a wise saying that there is no monitoring and no maintenance. The strength of zabbix is self-evident here. Today, we teach you how to use it to solve a common need, liberate the hands of operation and maintenance, and inspire your thinking. If you see the end with your heart, you will get something: First, the requirements are briefly in ...

Posted by dragon_sa on Thu, 01 Aug 2019 03:23:30 -0700

Getting Spring Application Context to restore the problem scene using Arthas

background Recently, a young monk intern has arranged for him to implement the small function of testing the connectivity of the target website. Simply speaking, the shell script below will be replaced by Java code to achieve it. #!/bin/bash URL="https://www.baidu" HTTP_CODE=`curl -o /dev/null -s -w "%{http_code}" "${URL}"` #echo $HTTP_CODE if ...

Posted by MarcAndreTalbot on Wed, 31 Jul 2019 19:06:59 -0700

Shell commands ls, passwd, cd, type, which, printenv, date, cal

The basic principles of Linux:1. Composed of a single-purpose applet: Combining applets to accomplish complex tasks2. Everything is a document3. Avoid capturing user interfaces as much as possible4. Save the configuration file in plain text formatGUI interface:dblclickCLI interface:Command prompt, prompt,bash(shell)#:root$: Ordinary usersComma ...

Posted by rweston002 on Wed, 31 Jul 2019 11:56:30 -0700

centOS 7 Add and Delete Users and User Groups

1. Adding new users Because the user rights of root are too large in daily use, a user is added for daily use or for other people's use. 1 Additional Users adduser [username] [root@centos ~]# adduser dex 2 Setting Password passwd [username] [root@centos ~]# passwd dex Changing password for ...

Posted by kabucek on Tue, 30 Jul 2019 07:54:05 -0700

MongoDB Learning Notes - Addition, deletion and modification of documents in Mongo Shell

MongoDB Learning Notes (2) - Documentation Addition, Deletion and Amendment in Mongo Shell The version of MongoDB used in this article is 4.0.10 > db.version(); 4.0.10 I. Insert Documents 1. Insert a document Syntax: db. < collection >. insert (document) Insert a document into the user collection in the test database: > use test; s ...

Posted by lamajlooc on Tue, 30 Jul 2019 04:33:17 -0700

Apache Spark Progressive Learning Tutorial: Spark Single Node Installation and Quick Start Demo

First, download Spark The first step in using Spark is to download and decompress. Let's start by downloading the precompiled version of Spark. Visits http://spark.apache.org/downloads.html To download the spark installation package. The version used in this article is: spark-2.4.3-bin-hadoop2.7.tgz Second, install Spark cd ~ tar -xf spark ...

Posted by culprit on Mon, 29 Jul 2019 04:21:08 -0700