Skip to content

Instantly share code, notes, and snippets.

View phiratio's full-sized avatar
:electron:
vertex

Bоzhidаr Dimitrоv phiratio

:electron:
vertex
View GitHub Profile
@phiratio
phiratio / principles.md
Created August 28, 2024 16:12 — forked from johnpryan/principles.md
Ray Dalio's Principles

Summary And Table Of Life Principles

Think for yourself to decide 1) what you want, 2) what is true, and 3) what you should do to achieve #1 in light of #2, and do that with humility and open-mindedness so that you consider the best thinking available to you.

Life Principles Introduction

Look to the patterns of those things that affect you in order to understand the cause-effect relationships that drive them and to learn principles for dealing with them effectively.

Part II: Life Principles

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

How to Install Sonarqube in Ubuntu Linux

Prerequsites

Virtual Machine running Ubuntu 22.04 or newer

Install Postgresql 15

sudo apt update
sudo apt upgrade

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
@phiratio
phiratio / top-brew-packages.txt
Created October 3, 2023 21:55 — forked from pmkay/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
# get total requests by status code
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn
# get top requesters by IP
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}'
# get top requesters by user agent
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
# get top requests by URL
@phiratio
phiratio / signing-vbox-kernel-modules.md
Created January 16, 2023 16:46 — forked from reillysiemens/signing-vbox-kernel-modules.md
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@phiratio
phiratio / zook_grow.md
Created August 29, 2022 07:22 — forked from miketheman/zook_grow.md
Adding nodes to a ZooKeeper ensemble

Adding 2 nodes to an existing 3-node ZooKeeper ensemble without losing the Quorum

Since many deployments may start out with 3 nodes and so little is known about how to grow a cluster from 3 memebrs to 5 members without losing the existing Quorum, here is an example of how this might be achieved.

In this example, all 5 nodes will be running on the same Vagrant host for the purpose of illustration, running on distinct configurations (ports and data directories) without the actual load of clients.

YMMV. Caveat usufructuarius.

Step 1: Have a healthy 3-node ensemble

@phiratio
phiratio / README.md
Created December 13, 2021 10:57 — forked from Potherca/README.md
BASH script to clone all git repository in a Group on GitLab, or Organization on GitHub.

Introduction

Starting at a new employer always mean checking out various git repositories.

As the amount of repositories a company has grows, the time needed to clone all of those repositories also grows.

This script automates this task.

In order for this script to work, a personal access token is needed.

@phiratio
phiratio / rclone-cron.sh
Created October 22, 2021 06:39 — forked from christippett/rclone-cron.sh
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Chris Tippett (c.tippett@gmail.com)
#
# Originally adapted from the great work by Jared Males (jaredmales@gmail.com)
# https://gist.github.com/jaredmales/2f732254bb10002fc0549fa9aa0abdd7
#
# Copyright (C) 2020 Chris Tippett (c.tippett@gmail.com)
#
@phiratio
phiratio / ovs+vxlan+lxd-lab.md
Created October 15, 2021 01:57 — forked from platu/ovs+vxlan+lxd-lab.md
VXLAN lab based on OpenVSwitch and lxd containers

% VXLAN lab based on OpenVSwitch and LXD containers


Preamble

The very first idea when I started writing this lab was to illustrate the Virtual Extensible LAN (VXLAN) technology. Now that OpenVSwitch configuration is smoothely integrated in the Debian networking configuration files, this should have resulted in somewhat easy-to-read gist.