π Sublime Text: Enable Spell Check
A Sublime Text can check spelling out of the box and uses Hunspell spell checker for this, that is also used by LibreOffice, OpenOffice.org, Mozilla Firefox, Thunderbird, Google Chrome etc.
By default, the spell checking feature in the Sublime Text it is disabled.
This short note shows how to enable the spell checking in the Sublime Text.
π Continue Reading
A Sublime Text can check spelling out of the box and uses Hunspell spell checker for this, that is also used by LibreOffice, OpenOffice.org, Mozilla Firefox, Thunderbird, Google Chrome etc.
By default, the spell checking feature in the Sublime Text it is disabled.
This short note shows how to enable the spell checking in the Sublime Text.
π Continue Reading
ShellHacks
Sublime Text: Enable Spell Check - ShellHacks
How to enable a spell checking feature in a Sublime Text.
π Kubectl: Delete Pods β Wildcard
When you deploy an application in a Kubernetes cluster, you usually set some labels on the Pods e.g.
These labels can be used as a wildcard for selecting a group of Pods for deletion.
This short note shows how to perform a wildcard deletion of Pods in Kubernetes.
π Continue Reading
When you deploy an application in a Kubernetes cluster, you usually set some labels on the Pods e.g.
app=my-app
.These labels can be used as a wildcard for selecting a group of Pods for deletion.
This short note shows how to perform a wildcard deletion of Pods in Kubernetes.
π Continue Reading
ShellHacks
Kubectl: Delete Pods - Wildcard - ShellHacks
How to delete Pods using Wildcard in Kubernetes.
π Kubernetes: Node βNotReadyβ [SOLVED]
When a Node in a Kubernetes cluster crashes or shuts down, it enters the 'NotReady' state in which it can't be used to run Pods and all stateful Pods running on it become unavailable.
Common reasons of the 'NotReady' error include a lack of resources on the Node, connectivity issue between the Node and the Control Plane, or an error related to a
This note shows how to troubleshoot the Kubernetes Node 'NotReady' state.
π Continue Reading
When a Node in a Kubernetes cluster crashes or shuts down, it enters the 'NotReady' state in which it can't be used to run Pods and all stateful Pods running on it become unavailable.
Common reasons of the 'NotReady' error include a lack of resources on the Node, connectivity issue between the Node and the Control Plane, or an error related to a
kube-proxy
or kubelet
.This note shows how to troubleshoot the Kubernetes Node 'NotReady' state.
π Continue Reading
ShellHacks
Kubernetes: Node 'NotReady' [SOLVED] - ShellHacks
How to troubleshoot the Kubernetes Node 'NotReady' state. Common reasons: resources, networking, `kube-proxy` or `kubelet` (stopped posting node status).
π Python: Login to Website β Selenium
Selenium is an open source tool that automates web browsers and is widely used for automated testing of web applications.
With Python and Selenium you can easily create a script that automates login to a website, that is very useful, for example, for web scraping.
This note shows how to create a Python script to login to a website automatically using Selenium on the example of Instagram.
π Continue Reading
Selenium is an open source tool that automates web browsers and is widely used for automated testing of web applications.
With Python and Selenium you can easily create a script that automates login to a website, that is very useful, for example, for web scraping.
This note shows how to create a Python script to login to a website automatically using Selenium on the example of Instagram.
π Continue Reading
ShellHacks
Python: Login to Website - Selenium - ShellHacks
How to create a Python script to login to a website automatically using Selenium on the example of Instagram.
π Python: Check Package Version
While working with Python you may wonder what is the version of a certain Python package (library) that you are using.
There are several ways of how to get the version of a package or module in Python.
This note describes how to check the version of Python packages from a Python shell, from a command-line (terminal) or using a
π Continue Reading
While working with Python you may wonder what is the version of a certain Python package (library) that you are using.
There are several ways of how to get the version of a package or module in Python.
This note describes how to check the version of Python packages from a Python shell, from a command-line (terminal) or using a
pip
command. π Continue Reading
ShellHacks
Python: Check Package Version - ShellHacks
How to check the version of a Python package (library) or module from a Python shell, from a command-line (terminal) or using a `pip` command.
π Kubernetes: Get ServiceAccount Permissions/Roles
A Service Account in Kubernetes is a special type of non-human privileged account that provides an identity for processes that run in a Pod.
When you create a Pod, if you do not specify a Service Account, it is automatically assigned the
This note shows how to list the Service Accounts in a Kubernetes cluster and how to get the Roles and permissions associated with a Service Account.
π Continue Reading
A Service Account in Kubernetes is a special type of non-human privileged account that provides an identity for processes that run in a Pod.
When you create a Pod, if you do not specify a Service Account, it is automatically assigned the
default
Service Account in the same Namespace. This note shows how to list the Service Accounts in a Kubernetes cluster and how to get the Roles and permissions associated with a Service Account.
π Continue Reading
ShellHacks
Kubernetes: Get ServiceAccount Permissions/Roles - ShellHacks
How to list Service Accounts in a Kubernetes cluster and how to get the Roles and permissions associated with a Service Account.
π You Need Permission to Perform This Action [FIXED]
While trying to delete, copy, move or rename some files or folders in Windows you may get the error: "You need permission to perform this action" followed by "You require permission from the computer's administrator to make changes to this file or folder".
This "Access Denied" error means that you are not authorized to make any changes to that file or folder, thought it may occur even if you are administrator.
In this note i will show how to fix the permissions on a file or folder and get rid of the "You need permission to perform this action" error in Windows.
π Continue Reading
While trying to delete, copy, move or rename some files or folders in Windows you may get the error: "You need permission to perform this action" followed by "You require permission from the computer's administrator to make changes to this file or folder".
This "Access Denied" error means that you are not authorized to make any changes to that file or folder, thought it may occur even if you are administrator.
In this note i will show how to fix the permissions on a file or folder and get rid of the "You need permission to perform this action" error in Windows.
π Continue Reading
ShellHacks
You Need Permission to Perform This Action [FIXED] - ShellHacks
How to fix the "You need permission to perform this action" error while trying to delete, copy, move or rename some file or folder in Windows.
π Disable Startup Programs in Windows
It is quite annoying when some apps are not expected to, but they are automatically opening on startup in Windows.
And it raises a perfectly logical question, how to stop such apps from running at startup.
In this note i will show the easiest and the most efficient way of how to find ALL startup programs in Windows and how to change their startup settings to stop them from automatically running at Windows startup.
π Continue Reading
It is quite annoying when some apps are not expected to, but they are automatically opening on startup in Windows.
And it raises a perfectly logical question, how to stop such apps from running at startup.
In this note i will show the easiest and the most efficient way of how to find ALL startup programs in Windows and how to change their startup settings to stop them from automatically running at Windows startup.
π Continue Reading
ShellHacks
Disable Startup Programs in Windows - ShellHacks
How to list and disable startup programs (stop apps from opening on startup) in Windows by using the Autoruns utility.
π Change User Name of Local Account in Windows
There may be different reasons for changing a local user account name in Windows.
For example, you may want to change the name on the sign-in screen to your actual name instead of the nickname or vice versa.
This short note describes the easiest way of changing a user name of the local account in Windows.
π Continue Reading
There may be different reasons for changing a local user account name in Windows.
For example, you may want to change the name on the sign-in screen to your actual name instead of the nickname or vice versa.
This short note describes the easiest way of changing a user name of the local account in Windows.
π Continue Reading
ShellHacks
Change User Name of Local Account in Windows - ShellHacks
How to change a user name of the local user account in Windows.
π PasswordNeverExpires: Disable Password Expiration
A password expiration is a feature in Windows that forces users to change their passwords after a certain number of days.
When it is time to change your password, Windows will send you a "Consider changing your password" notification.
In this note i will show several ways of how to disable the password expiration of a local user account in Windows.
π Continue Reading
A password expiration is a feature in Windows that forces users to change their passwords after a certain number of days.
When it is time to change your password, Windows will send you a "Consider changing your password" notification.
In this note i will show several ways of how to disable the password expiration of a local user account in Windows.
π Continue Reading
ShellHacks
PasswordNeverExpires: Disable Password Expiration - ShellHacks
How to disable a password expiration of a local user account in Windows after getting: "Consider changing your password". Set a password to never expire.
π Rename User Folder in Windows
User profiles in Windows on the most of computers are usually located in the folder
By default, the user folder name is the same as you user name.
But if you change your user name, the old name of your user folder will remain and you may want to rename it as well.
The renaming of the user folder in Windows is not so straightforward, but i will show how to do this in a quick, safe and easy way.
π Continue Reading
User profiles in Windows on the most of computers are usually located in the folder
C:\users\
.By default, the user folder name is the same as you user name.
But if you change your user name, the old name of your user folder will remain and you may want to rename it as well.
The renaming of the user folder in Windows is not so straightforward, but i will show how to do this in a quick, safe and easy way.
π Continue Reading
ShellHacks
Rename User Folder in Windows - ShellHacks
How to change a local user profile folder name in Windows using another Administrative account, CMD and Registry Editor.
π Ansible: Skip Parameter If Variable Not Defined
In Ansible, if you run a task that has some module's parameter with a variable that is not set you will get "The task includes an option with an undefined variable" error.
If for some reason you can't or don't want to define this variable, you can make it optional.
In this case Ansible will ignore the parameter with the optional variable if it is not defined.
This note shows how to skip a module's parameter in Ansible if a variable is not defined.
π Continue Reading
In Ansible, if you run a task that has some module's parameter with a variable that is not set you will get "The task includes an option with an undefined variable" error.
If for some reason you can't or don't want to define this variable, you can make it optional.
In this case Ansible will ignore the parameter with the optional variable if it is not defined.
This note shows how to skip a module's parameter in Ansible if a variable is not defined.
π Continue Reading
ShellHacks
Ansible: Skip Parameter If Variable Not Defined - ShellHacks
How to skip a module's parameter in Ansible if a variable is not defined.
π Python Script Not Showing Output [SOLVED]
It may happen that you execute a Python script and nothing happenes, i.e. it seems that it "hangs" without showing any output.
Even if you explicitly include some
One of the reasons of why your Python script does not show any output is because it buffers
This also can happen if you execute the Python script from a CI/CD pipeline (e.g. using Jenkins, Gitlab-CI, TeamCity, etc.) or if you run it using a
This short note shows how to solve the issue when the Python script "hangs" and doesn't show any output.
π Continue Reading
It may happen that you execute a Python script and nothing happenes, i.e. it seems that it "hangs" without showing any output.
Even if you explicitly include some
print()
statements to debug the issue, it may still not print anything to a terminal.One of the reasons of why your Python script does not show any output is because it buffers
stdout
and stderr
steams instead of printing them.This also can happen if you execute the Python script from a CI/CD pipeline (e.g. using Jenkins, Gitlab-CI, TeamCity, etc.) or if you run it using a
Dockerfile
.This short note shows how to solve the issue when the Python script "hangs" and doesn't show any output.
π Continue Reading
ShellHacks
Python Script Not Showing Output [SOLVED] - ShellHacks
Debug a Python script that hangs and doesn't print anything to a terminal by forcing the `stdout` and `stderr` streams to be unbuffered (PYTHONUNBUFFERED).
π Linux Mint: Lock Screen on Lid Close β Enable/Disable
When a laptop lid is getting closed, different scenarios are possible: do nothing, blank screen, suspend or shutdown.
In Linux Mint, the system behavior on closing the lid is controlled by the "Power Management" and "Screensaver" settings.
This note shows how to enable or disable screen locking when closing the lid in Linux Mint.
π Continue Reading
When a laptop lid is getting closed, different scenarios are possible: do nothing, blank screen, suspend or shutdown.
In Linux Mint, the system behavior on closing the lid is controlled by the "Power Management" and "Screensaver" settings.
This note shows how to enable or disable screen locking when closing the lid in Linux Mint.
π Continue Reading
ShellHacks
Linux Mint: Lock Screen on Lid Close - Enable/Disable - ShellHacks
How to enable or disable screen locking when closing a laptop lid in Linux Mint.
π Click Button by Text β Python & Selenium
Selenium is an open source tool that automates web browsers and is widely used for automated testing of web applications.
With Python and Selenium you can easily create a script that searches a web-page for a button containing a particular text and clicks on it.
This note shows an example of how to find a button by text and click on it using Selenium and Python.
π Continue Reading
Selenium is an open source tool that automates web browsers and is widely used for automated testing of web applications.
With Python and Selenium you can easily create a script that searches a web-page for a button containing a particular text and clicks on it.
This note shows an example of how to find a button by text and click on it using Selenium and Python.
π Continue Reading
ShellHacks
Click Button by Text - Python & Selenium - ShellHacks
How to find a button containing a particular text and click on it using Selenium and Python.
π Run Selenium Headless β Chrome | Firefox (Python)
Selenium is an open source tool for web browsers automation that is widely used in tandem with Python to test web applications.
As these tests are often automated and run on dedicated nodes, there is a sense to run Selenium in a headless mode, i.e. without opening a browser.
This note shows how to run headless Selenium in Python on the example of Chrome and Firefox browsers controlled by a ChromeDriver and GeckoDriver correspondingly.
π Continue Reading
Selenium is an open source tool for web browsers automation that is widely used in tandem with Python to test web applications.
As these tests are often automated and run on dedicated nodes, there is a sense to run Selenium in a headless mode, i.e. without opening a browser.
This note shows how to run headless Selenium in Python on the example of Chrome and Firefox browsers controlled by a ChromeDriver and GeckoDriver correspondingly.
π Continue Reading
ShellHacks
Run Selenium Headless - Chrome | Firefox (Python) - ShellHacks
How to run Selenium headless (without opening Chorme/Firefox browsers) using ChromeDriver/GeckoDriver and Python.
π Python: Write to File | Read from File β Best Practice
To write something to a file or to read the content of a file in Python it is required to
The best practice in Python is to read/write to a file by using the
The
This note shows the best practice Python examples of how to write to a file or read the file's content and save it to a variable.
π Continue Reading
To write something to a file or to read the content of a file in Python it is required to
open()
and close()
the file properly.The best practice in Python is to read/write to a file by using the
with
statement - the replacement for commonly used try...finally
error-handling statements. The
with
statement ensures that the file is closed when the block inside it is exited.This note shows the best practice Python examples of how to write to a file or read the file's content and save it to a variable.
π Continue Reading
ShellHacks
Python: Write to File | Read from File - Best Practice - ShellHacks
Best practice Python examples of how to write something to a file or how to read the content of a file and `close()` the file properly.
π Python: Send Message to Telegram
To send a message to a Telegram channel using Python, first of all it is required to create a Telegram bot.
While creating the Telegram bot you will get an
In this note you will find the examples of the Python scripts for sending messages, images, etc. to Telegram through the API.
π Continue Reading
To send a message to a Telegram channel using Python, first of all it is required to create a Telegram bot.
While creating the Telegram bot you will get an
apiToken
and a chatID
that will be used in a Python script to access the Telegram API and send the message.In this note you will find the examples of the Python scripts for sending messages, images, etc. to Telegram through the API.
π Continue Reading
ShellHacks
Python: Send Message to Telegram - ShellHacks
How to send a message to a Telegram channel through API using Python. Code examples.
π Sublime Text: Remove Empty Lines
If you try to figure out how to remove the blank lines in a document, i.e. the lines that contain only spaces, tabs or the newline characters, you should know that in almost any IDE, like a Sublime Text, this can de done really simple.
The Sublime Text, like the other IDEs, has the ability to delete empty lines in the "Replace" operation by using the "Regular expression".
This short note shows how to remove empty lines in the Sublime Text.
π Continue Reading
If you try to figure out how to remove the blank lines in a document, i.e. the lines that contain only spaces, tabs or the newline characters, you should know that in almost any IDE, like a Sublime Text, this can de done really simple.
The Sublime Text, like the other IDEs, has the ability to delete empty lines in the "Replace" operation by using the "Regular expression".
This short note shows how to remove empty lines in the Sublime Text.
π Continue Reading
ShellHacks
Sublime Text: Remove Empty Lines - ShellHacks
How to remove empty lines in Sublime Text.
π Kubectl: Get ConfigMap β Kubernetes
In programming, we use
This permits to run the application in different environments.
A ConfigMap in a Kubernetes is used to achieve the same functionality - it allows to make applications portable by decoupling environment-specific configurations from the containers.
The ConfigMap is a dictionary of configuration settings that consists of key-value pairs.
This note shows how to get the ConfigMap using the
π Continue Reading
In programming, we use
.env
or separate config files to store settings, configurations or variables separately from the application code.This permits to run the application in different environments.
A ConfigMap in a Kubernetes is used to achieve the same functionality - it allows to make applications portable by decoupling environment-specific configurations from the containers.
The ConfigMap is a dictionary of configuration settings that consists of key-value pairs.
This note shows how to get the ConfigMap using the
kubectl
command. π Continue Reading
ShellHacks
Kubectl: Get ConfigMap - Kubernetes - ShellHacks
How to get a ConfigMap in a Kubernetes using the `kubectl` command.