Golang Resources

I will add more resources. Please return to find something new! Study Resource golangr Golang Cheat Sheet Codecademy - go Books Head First Go (got my introduction with this) Thoughts on Head-first Go: This book was published before Generics was introduced in Go, so there’s no introduction to Generics. The author discussed unbuffered channels but gave a short introduction to buffered channels. Exercises golangr exercises exercism-go gophercises

June 13, 2023 · 1 min · 67 words · by Loknath

📊 Be better..

I often consider myself “Lucky” to be born in this era; the era of being connected, knowledge sharing and collaboration. While scrolling through the internet, I found so many well-written thoughts and blogs that should be shared. In my daily life, I’m trying to be a DevOps practitioner, to be a gopher and sharpen my knowledge of the basics. Here, I will share some resources, i.e., blogs I find amazing. Whether you’re a DevOps practitioner, SRE, Linux System Administrator or believe in self-development - these resources will significantly help you....

May 28, 2023 · 2 min · 216 words · by Loknath

Nginx Logging

Nginx uses a few different directives to control system logging. The one included in the core module is called error_log. error_log directive Syntax: error_log log_file log_level. log_file: specifies the file where the logs will be written. log_level: specifies the lowest level of logging to be recorded. Logging levels emerg: emergency situations. alert: crit: error: warn: notice: info debug: Example: error_log /var/log/nginx/error.log crit; # Don't log anything error_log /dev/null crit; error_log is part of the core module; the access_log is part of the HttpLogModule....

May 20, 2023 · 1 min · 193 words · by Loknath

Let's learn: logrotate!

Logrotate is a system utility that manages the automatic rotation and compression of log files. logrotate --version man logrotate Configuration can be found generally in two places: /etc/logrotate.conf: contain some default settings, sets up rotation for a few logs that are not owned by any system packages. Also uses an include statement to pull in configuration from any file from the logrotate directory. /etc/logrotate.d: files for packages. By default, logrotate.confwill configure weekly log rotations, with log files owned by the root user and the syslog group....

May 10, 2023 · 2 min · 287 words · by Loknath

Let's learn: journalctl!

jounralctl is the command line tool that let us interact with the journal logs. Default location of journald logs is /var/log/journal directory. Type journalctl in the terminal, it will show the journal logs in chronological order. journalctl --no-pager will display entire logs directly on the screen. journalctl -n 25: will display most recent 25 lines of the logs. journalctl -f: view logs in real time. jouralctl --utc: display logs in UTC time....

April 30, 2023 · 3 min · 452 words · by Loknath

Let's learn: systemctl!

Service management sudo systemctl start app.service sudo systemctl stop app.service sudo systemctl restart app.service sudo systemctl reload app.service sudo systemctl reload-or-restart app.service sudo systemctl enable app.service sudo systemctl disable app.service Checking status systemctl status app.service systemctl is-active app.service systemctl is-enabled app.service systemctl is-failed app.service System state overview # see a list of active units systemctl list-units systemctl # returns same as above systemctl list-units --all systemctl list-units --all --state=inactive systemctl list-units --type=service To see every available units in the system paths (including those that systemd has not attempted to load):...

March 20, 2023 · 3 min · 446 words · by Loknath

Common Vim/Neovim Settings

As I edit system configuration files daily on the cloud, my number one choice for a text editor is Vim. So here’s a post about some standard settings: Will work on NeoVim too! " Number-related settings set number " Display line numbers set relativenumber " Display relative line numbers set signcolumn=yes " Always show the sign column " Search-related settings set hlsearch " Highlight search results set incsearch " Highlight search matches as you type set ignorecase " Ignore case when searching set smartcase " Ignore case only if search pattern is all lowercase " Appearance-related settings set laststatus=2 " Always show status line set cursorline " Highlight current line " set colorcolumn=80 " Display a vertical line at column 80 to help with line length set noerrorbells " Disable error bells and visual bells set wrap " Wrap long lines visually set linebreak " Break long lines at word boundaries " Window-related settings set splitright " Split windows to the right set splitbelow " Split windows below set scrolloff=5 " Keep 5 lines above/below cursor when scrolling set clipboard+=unnamed " Copy text to system clipboard set mouse=a " Enable mouse support " Completion-related settings set wildmenu " Show command-line completion options in a menu set wildmode=list:longest,full " Highlight and complete the longest common part of the options " Mode-related settings set showmode " Show current mode (insert/visual/command) in status line " Folding-related settings set foldmethod=indent " Use indent-based folding set foldlevelstart=99 " Start with all folds open " Wrapping-related settings set whichwrap+=<,>,h " Allow wrapping past the beginning or end of a line " Create a horizontal split with Ctrl+s nnoremap <C-s> :split<CR> " Create a vertical split with Ctrl+v nnoremap <C-v> :vsplit<CR> " Create a new horizontal split and start editing a new file with Ctrl+n nnoremap <C-n> :split<CR>:enew<CR> " Create a new vertical split and start editing a new file with Ctrl+m nnoremap <C-m> :vsplit<CR>:enew<CR> Thanks!...

March 15, 2023 · 2 min · 319 words · by Loknath

Set up SSL for SolrCloud

As I am highly dependent on official documentation, I found that Apache Solr maintain an awesome documentation from which I learned a lot. Setting up SSL can be found here. I am writing this for easier step by step setup. Happy Searching! Generate certificate & key From the official documentation, you can generate a self-signed certificate to test your setup. But for the trusted authority, generate a certificate and convert it to ....

March 13, 2023 · 2 min · 354 words · by Loknath