From 6056258a66ac016c1294e2fd88425f90098cd1f9 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Tue, 23 May 2023 01:48:05 +0200 Subject: Fixed a bunch of content headings --- ...digitalocean-spaces-object-storage-with-fuse.md | 2 +- content/posts/2021-08-01-linux-cheatsheet.md | 141 +++++---------------- ...n-based-riced-up-distribution-for-developers.md | 4 +- 3 files changed, 38 insertions(+), 109 deletions(-) (limited to 'content/posts') diff --git a/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md b/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md index 504e659..75f7799 100644 --- a/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md +++ b/content/posts/2018-01-16-using-digitalocean-spaces-object-storage-with-fuse.md @@ -7,7 +7,7 @@ draft: false Couple of months ago [DigitalOcean](https://www.digitalocean.com) introduced new product called [Spaces](https://blog.digitalocean.com/introducing-spaces-object-storage/) which is Object Storage very similar to Amazon's S3. This really peaked my interest, because this was something I was missing and even the thought of going over the internet for such functionality was in no interest to me. Also in fashion with their previous pricing this also is very cheap and pricing page is a no-brainer compared to AWS or GCE. [Prices are clearly and precisely defined and outlined](https://www.digitalocean.com/pricing/). You must love them for that :) -### Initial requirements +## Initial requirements * Is it possible to use them as a mounted drive with FUSE? (tl;dr YES) * Will the performance degrade over time and over different sizes of objects? (tl;dr NO&YES) diff --git a/content/posts/2021-08-01-linux-cheatsheet.md b/content/posts/2021-08-01-linux-cheatsheet.md index 1645eaf..8c0d125 100644 --- a/content/posts/2021-08-01-linux-cheatsheet.md +++ b/content/posts/2021-08-01-linux-cheatsheet.md @@ -5,7 +5,7 @@ date: 2021-08-01 draft: false --- -##### Generate SSH key +**Generate SSH key** ```bash ssh-keygen -t ed25519 -C "your_email@example.com" @@ -16,9 +16,7 @@ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" Note: By default SSH keys get stored to `/home//.ssh/` folder. - - -##### Login to host via SSH +**Login to host via SSH** ```bash # connect to host as your local username @@ -31,9 +29,7 @@ ssh @ ssh -p @ ``` - - -##### Execute command on a server through SSH +**Execute command on a server through SSH** ```bash # execute one command @@ -43,66 +39,50 @@ ssh root@100.100.100.100 "ls /root" ssh root@100.100.100.100 "cd /root;touch file.txt" ``` - - -##### Displays currently logged in users in the system +**Displays currently logged in users in the system** ```bash w ``` - - -##### Displays Linux system information +**Displays Linux system information** ```bash uname ``` - - -##### Displays kernel release information +**Displays kernel release information** ```bash uname -r ``` - - -##### Shows the system hostname +**Shows the system hostname** ```bash hostname ``` - - -##### Shows system reboot history +**Shows system reboot history** ```bash last reboot ``` - - -##### Displays information about the user +**Displays information about the user** ```bash sudo apt install finger finger ``` - - -##### Displays IP addresses and all the network interfaces +**Displays IP addresses and all the network interfaces** ```bash ip addr show ``` - - -##### Downloads a file from an online source +**Downloads a file from an online source** ```bash wget https://example.com/example.tgz @@ -110,9 +90,7 @@ wget https://example.com/example.tgz Note: If URL contains ?, & enclose the URL in double quotes. - - -##### Compress a file with gzip +**Compress a file with gzip** ```bash # will not keep the original file @@ -122,9 +100,7 @@ gzip file.txt gzip --keep file.txt ``` - - -##### Interactive disk usage analyzer +**Interactive disk usage analyzer** ```bash sudo apt install ncdu @@ -133,9 +109,7 @@ ncdu ncdu ``` - - -##### Install Node.js using the Node Version Manager +**Install Node.js using the Node Version Manager** ```bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash @@ -144,9 +118,7 @@ source ~/.bashrc nvm install v13 ``` - - -##### Too long; didn't read +**Too long; didn't read** ```bash npm install -g tldr @@ -154,17 +126,13 @@ npm install -g tldr tldr tar ``` - - -##### Combine all Nginx access logs to one big log file +**Combine all Nginx access logs to one big log file** ```bash zcat -f /var/log/nginx/access.log* > /var/log/nginx/access-all.log ``` - - -##### Set up Redis server +**Set up Redis server** ```bash sudo apt install redis-server redis-tools @@ -180,9 +148,7 @@ redis-cli get mykey redis-cli ``` - - -##### Generate statistics of your webserver +**Generate statistics of your webserver** ```bash sudo apt install goaccess @@ -206,50 +172,38 @@ goaccess \ rm /var/log/nginx/access-all.log ``` - - -##### Search for a given pattern in files +**Search for a given pattern in files** ```bash grep -r ‘pattern’ files ``` - - -##### Find proccess ID for a specific program +**Find proccess ID for a specific program** ```bash pgrep nginx ``` - - -##### Print name of current/working directory +**Print name of current/working directory** ```bash pwd ``` - - -##### Creates a blank new file +**Creates a blank new file** ```bash touch newfile.txt ``` - - -##### Displays first lines in a file +**Displays first lines in a file** ```bash # -n presents the number of lines (10 by default) head -n 20 somefile.txt ``` - - -##### Displays last lines in a file +**Displays last lines in a file** ```bash # -n presents the number of lines (10 by default) @@ -259,17 +213,13 @@ tail -n 20 somefile.txt tail -f somefile.txt ``` - - -##### Count lines in a file +**Count lines in a file** ```bash wc -l somefile.txt ``` - - -##### Find all instances of the file +**Find all instances of the file** ```bash sudo apt install mlocate @@ -277,49 +227,37 @@ sudo apt install mlocate locate somefile.txt ``` - - -##### Find file names that begin with ‘index’ in /home folder +**Find file names that begin with ‘index’ in /home folder** ```bash find /home/ -name "index" ``` - - -##### Find files larger than 100MB in the home folder +**Find files larger than 100MB in the home folder** ```bash find /home -size +100M ``` - - -##### Displays block devices related information +**Displays block devices related information** ```bash lsblk ``` - - -##### Displays free space on mounted systems +**Displays free space on mounted systems** ```bash df -h ``` - - -##### Displays free and used memory in the system +**Displays free and used memory in the system** ```bash free -h ``` - - -##### Displays all active listening ports +**Displays all active listening ports** ```bash sudo apt install net-tools @@ -327,30 +265,21 @@ sudo apt install net-tools netstat -pnltu ``` - - -##### Kill a process violently +**Kill a process violently** ```bash kill -9 ``` - - -##### List files opened by user +**List files opened by user** ```bash lsof -u ``` - - -##### Execute "df -h", showing periodic updates +**Execute "df -h", showing periodic updates** ```bash # -n 1 means every second watch -n 1 df -h ``` - - - diff --git a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md index e0677cf..56816a0 100644 --- a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md +++ b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md @@ -151,7 +151,7 @@ This is some of the output from the installation script. Let's take a look at some examples in the installation script. -#### Docker recipe +### Docker recipe ```sh # docker @@ -168,7 +168,7 @@ systemctl status docker --no-pager /sbin/usermod -aG docker $USERNAME ``` -#### Making bash pretty +### Making bash pretty I really like [Oh My Zsh](https://ohmyz.sh/), but I don't like zsh shell. When I used it, I constantly needed to be aware of it and running bash scripts was a pain. So, I was really delighted when I found out that a version for bash existed called [Oh My Bash](https://ohmybash.nntoan.com/). Let's take a look at the recipe for installing it. -- cgit v1.2.3