Skip to content

Instantly share code, notes, and snippets.

View linuxkathirvel's full-sized avatar

Kathirvel Rajendran linuxkathirvel

View GitHub Profile
@linuxkathirvel
linuxkathirvel / python3-virtualenv.md
Last active April 23, 2019 07:22
Python 3 virtual environment by pip

Python 3 virtual environment by pip

sudo apt-get install python-pip python-dev -y
sudo apt-get install python3
pip install virtualenv

virtualenv -p python3 py3env
source py3env/bin/activate
pip install --upgrade virtualenv
@linuxkathirvel
linuxkathirvel / posgresql-setup-for-jira.md
Last active January 8, 2020 10:01
PostgreSQL 9.6 setup for JIRA 7.10.1 in CentOS 7. We can use this steps for JIRA Data Center also.

Install PostgreSQL 9.6 in CentOS7

sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm -y
sudo yum install postgresql96 -y
sudo yum install postgresql96-server -y

sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb
sudo systemctl enable postgresql-9.6
sudo systemctl start postgresql-9.6
@linuxkathirvel
linuxkathirvel / python-coding-style.md
Last active November 22, 2018 11:21
Coding style for Python as per PEP 8 recommendation

Python coding style - PEP8

Indentation

# Use 4 spaces per indentation level.
add = addition(number1, number2,
                number3, number4)

def addition(
      number1, number2,
 number3):
@linuxkathirvel
linuxkathirvel / boot-ubuntu-iso-directly-from-grub.md
Last active November 29, 2018 06:39
Boot Ubuntu 18.04 LTS ISO directly from GRUB menu
# Open /boot/grub/grub.cfg
sudo vim /boot/grub/grub.cfg

# Add below lines in /boot/grub/grub.cfg file after "### END /etc/grub.d/40_custom ###" line
menuentry "Ubuntu 18.04.1 LTS ISO" {
         set isofile="/ubuntu-18.04.1-desktop-amd64.iso"
         loopback loop (hd0,2)$isofile
         linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
 initrd (loop)/casper/initrd.lz
@linuxkathirvel
linuxkathirvel / filter-digits-from-python-date-and-time.py
Created November 29, 2018 10:34
Filter the digits from Python date and time
import datetime
print str(filter(str.isdigit, str(datetime.datetime.now())))
@linuxkathirvel
linuxkathirvel / openldap-installation-in-centos7.md
Last active November 30, 2018 19:17
OpenLDAP installation in CentOS 7

LDAP Terminology

  • LDIF - LDAP Data Interchange Format
sudo su
yum install openldap openldap-clients openldap-servers
slappasswd
systemctl start slapd
systemctl enable slapd
@linuxkathirvel
linuxkathirvel / mysql57-in-centos7.md
Last active January 14, 2025 07:44
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 / change-mysql-data-directroy-to-new-location.md
Last active November 9, 2021 07:20
Change a MySQL Data Directory to a New Location on CentOS 7

Change a MySQL Data Directory to a New Location on CentOS 7

mysql -u root -p

# Check current data directory
mysql> select @@datadir;
+-----------------+
| @@datadir       |
+-----------------+
| /var/lib/mysql/ |
@linuxkathirvel
linuxkathirvel / open-bookmarks-always-in-newtab.md
Last active April 25, 2019 07:41
Open Bookmarks Always in New Tab in Firefox

Open Bookmarks Always in New Tab in Firefox

  • Enter 'about:config' in address bar
  • Click 'I accept the risk' button
  • Search 'browser.tabs.loadBookmarksInTabs'
  • Change 'browser.tabs.loadBookmarksInTabs' value as 'true'
  • Close the tab
@linuxkathirvel
linuxkathirvel / vimrc.sh
Created December 4, 2018 13:08
VIM configuration
" for HTML
autocmd FileType html setlocal shiftwidth=2 tabstop=2
" enable syntax highlighting
syntax enable
filetype on
filetype plugin on
filetype indent on
" set color scheme
" colorscheme elflord