Skip to content

Instantly share code, notes, and snippets.

View linuxkathirvel's full-sized avatar

Kathirvel Rajendran linuxkathirvel

View GitHub Profile
@linuxkathirvel
linuxkathirvel / print-scr-key-to-flameshot-tool-in-gnome3.md
Last active April 18, 2024 03:35
How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

  1. Goto Keyboard settings and click 'Save a screenshot to Pictures' under 'Screenshots' section.
  2. Press 'Backspace' key delete 'PrtScr' key shortcut and press 'Set' button
  3. Press '+'(Plust) icon in the 'Custom Shortcuts' in the same window
  4. Enter 'Flameshot' in 'Name' field , 'flameshot gui' in 'Command' field, and click 'Set Shortcut' button and press 'PrtScr' button in the keyboard and close the dialog box 5.That's it. If you press 'PrtScr' key, the Flameshot selection area screen will appear.
@linuxkathirvel
linuxkathirvel / install-psycopg2-on-manjaro-and-arch.md
Created July 2, 2020 09:30
How to install Python psycopg2 package in Manjaro and Arch Linux?

How to install Python psycopg2 in Manjaro and Arch Linux?

sudo pacman -S postgresql-libs
pip install psycopg2
@linuxkathirvel
linuxkathirvel / mysql57-in-centos7.md
Last active March 20, 2024 22:14
Install MySQL 5.7 in CentOS7/RHEL7

MySQL 5.7 installation in CentOS 7

sudo su

# Remove MariaDB packages
yum list installed | grep -i maria
yum remove mariadb.x86_64
yum remove mariadb-libs.x86_64

# Download MySQL 5.7 RPM tar
@linuxkathirvel
linuxkathirvel / how-to-boot-iso-in-kvm-using-xml.md
Last active March 7, 2024 10:28
How to boot ISO image in KVM using XML configuration?

How to boot ISO image in KVM using XML configuration?

<disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/data_ssd/iso-images/ubuntu-16.04.6-server-amd64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <boot order='1'/>
 
@linuxkathirvel
linuxkathirvel / install-microsoft-core-fonts-in-opensuse-15-1-leap.md
Created May 28, 2019 13:32
Install Microsoft Core Fonts in OpenSUSE 15.1 Leap

Install Microsoft Core Fonts in OpenSUSE 15.1 Leap

sudo zypper install fetchmsttfonts
@linuxkathirvel
linuxkathirvel / openvpn-connection-in-kde-plasma.md
Last active February 3, 2024 09:24
How to create OpenVPN connection in KDE Plasma using NetworkManager GUI with .ovpn file?

How to create OpenVPN connection in KDE Plasma using NetworkManager GUI with .ovpn file?

2020-11-18_13-59 2020-11-18_14-05 2020-11-18_21-45 2020-11-20_09-24 2020-11-18_21-48 2020-11-20_09-08 2020-11-20_09-10

@linuxkathirvel
linuxkathirvel / postgresql-backup-using-pg_dump.md
Last active December 7, 2023 13:11
How to take backup PosgreSQL using pg_dump with crontab in Linux?

How to take backup PosgreSQL using pg_dump with crontab in Linux?

Find the pg_hba.conf file

sudo su - postgres
psql
SHOW hba_file;

Change the method to 'trust' and save the file

sudo vim /etc/postgresql/11/main/pg_hba.conf
@linuxkathirvel
linuxkathirvel / but-it-only-supports-http-in-django.md
Last active July 27, 2023 10:16
How to fix "You're accessing the development server over HTTPS, but it only supports HTTP." in Django?

How to fix "You're accessing the development server over HTTPS, but it only supports HTTP." in Django?

Check the Django's site URL. It may have https.

Disable following variables in settings.py or .env

SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_SSL_REDIRECT = True
@linuxkathirvel
linuxkathirvel / fix-must-be-owner-of-relation-error-in-django-postgresql.md
Created October 26, 2020 11:07
How to solve "django.db.utils.ProgrammingError: must be owner of relation table_name"

How to solve "django.db.utils.ProgrammingError: must be owner of relation table_name"?

\c database_name;
REASSIGN OWNED BY old_owner TO new_owner;
@linuxkathirvel
linuxkathirvel / how-to-fix-err-too-many-redirects.md
Last active April 6, 2023 20:31
How to fix ERR_TOO_MANY_REDIRECTS issue in Django+Gunicorn+NGINX?

How to fix ERR_TOO_MANY_REDIRECTS issue in Django+Gunicorn+NGINX?

NGINX configuration

server {
        listen 80;
        server_name kathirvel.com;
        return 301 https://kathirvel.com;
        client_max_body_size 1024M;
}
server {