Using Gmail with Custom Domain at No Cost

Using Gmail with Custom Domain at No Cost

I like Gmail, but sometimes I have to use the email under the different domain and I do not want to integrate my domain with google ecosystem (G-Suite). I tried to use SMTP + POP3 integration but after some DDoS attacks to smaller mail servers some of Google IPs were blacklisted and I was unable to use this integration more. So I found another way how to fix this. -1. Create Gmail of you do not have one I assume…

Read More Read More

Python dependencies on project level

Python dependencies on project level

Since I started work with Python, I struggled with dependencies on a project level. I was aware of requirements.txt file, but handling it became very difficult for multiple projects. Fortunately I found very handy tool called pipreqs which generages a project level requirements.txt file using one command. Installation

Usage Just go into your project directory and run

and install inside target environment

Sometimes it does on work on 100 %, but it can save a lot of…

Read More Read More

ls -la output explanation

ls -la output explanation

Show files ls Will provide basic overview of files and folders present in the directory

Show files with details ls -l With file / folder details

Show hidden files ls -la Will show hidden files with . prefix

Output exmplanation

Bonus Running this command will add alias ll to run ls -la where this shortcut is not present yet.

Connecting the Raspberry Pi Zero W/WH to WiFi

Connecting the Raspberry Pi Zero W/WH to WiFi

Recently I bought a Raspberry Pi Zero WH, and I wanted to connect it to my WiFi, but first 5 guides from Google were not working well, so I wanted to share the approach I used using raspi-config. 0. Get ready Raspbian on the Pi And connect to it using ethernet or plug in the monitor to it via HDMI. 1. Get ready SSH You can do this using sudo raspi-config (5. Interfacing options/P2 SSH) or using

Default credentials…

Read More Read More

Vermikompostování a “Good First Issue”

Vermikompostování a “Good First Issue”

Popravdě bych vůbec nečekal, že někdy podobný typ článků někdy napíšu (:D), Žížaly, what? DISCLAIMER: Jedná se o žížaly kalifornské, nikoliv ty, které se běžně vyskytují v půdě Musím se přiznat, že mi nápad dobrovolně si doma něco kompostovat a ještě k tomu za žížalí pomoci přišel poněkud uhozený. Na druhou stranu jsem si však dal množství odpadu, který každý den zbytečně skončí v popelnici a tak nakonec mne “chování” žižal začalo docela zajímat. Plán byl koupit vermikompostér po…

Read More Read More

Kubernetes and Sealed Secrets (Kubernetes)

Kubernetes and Sealed Secrets (Kubernetes)

PROBLEM: I would like to share my secrets to git SOLUTION: Use the Sealed Secretes (Installing kubeseal) Kubeseal is the CLI tool to manage sealed secret, is you are using macOS, you should use brew:

On (ubuntu based) linux you should be fine using:

Creating a secret There are different ways how to create a secret, I am using direct input (–from-literal) or direct YAML efinition. I will show both. Let’s assume I am deploying some application which will…

Read More Read More

Display apps and occupied ports (Linux)

Display apps and occupied ports (Linux)

PROBLEM: My app is not starting, because port is already in use! SOLUTION: Find it and kill it 🙂 netstat -tulpn Will provide nice table with all info you migh like, truncated outpus below:

sudo ss -tulpn More fresh, more detailed (i like it more than netstat)

Now you can find what is “eating” your ports and you are able to debug errors 🙂 Note: If you cannot see the PID, use sudo to execute the command

Resize swap in Ubuntu 18.04 and later (Linux)

Resize swap in Ubuntu 18.04 and later (Linux)

PROBLEM: My swap is too small 🙁 SOLUTION: Disable, resize and enable swap again! 1. Disable swap

2. Resize swap With goal of 2 GB (1 GB * 2)

Where: if – input file of – output file bs – block size count – block multiplier Note: If you get error: dd: memory exhausted by input buffer of size 1073741824 bytes (1.0 GiB) just try to change the bs to MB and increase the count size

3. Make…

Read More Read More

Permanently exporting environment variables using direnv (Linux)

Permanently exporting environment variables using direnv (Linux)

PROBLEM: I use some variables (credentials) so often, but I don’t like exporting them each time SOLUTION: Start using direnv! Direnv should be already present in your system You can check the same on the direnv website (here), if is not, you can always build it from binary. Hook direnv into shell Add this line on the end of your .bashrc file (if you are using bash)

Create .envrc file And put all variables you would like to have accesible…

Read More Read More

Ports in Kubernetes Services (Kubernetes)

Ports in Kubernetes Services (Kubernetes)

Just a quick reminder how ports definition in k8s services works. Service definition example below, just forgot all but port definition and take a closer look. NodePort

We can see port definition 3 times (it’s array and you can use as many of them as open ports you need): port, targetPort and nodePort. Why 3 ports? If you are familiar with Docker (Swarm) you would expect only 2, right…? NodePort port : other pod/service inside our cluster can access…

Read More Read More