This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Activating Several Crucial Linux Repos: | |
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ## | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
## CentOS 6 and Red Hat (RHEL) 6 ## | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Shahriyar Rzayev, rzayev.sehriyar@gmail.com | |
Written in Python 3 using shutil.make_archive. (Tested with Python 3.3.5) | |
Purpose of class to create tar.gz archive files. | |
General usage is to create crontab, for archiving log files or another .zip files, to one archive file. | |
After All usage process there will be created zip_archive.tar.gz file. | |
Compression level: Default | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Written in Python 3. | |
Running JAR file within Python file. | |
Especially for DWH super boy (after Shahmaddin) Rahim's JAR file (mail sender) :D :D | |
Using Oracle cx_Oracle library + Python 3's subprocess.Popen | |
""" | |
import cx_Oracle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. # Searching for a single whole word in file # | |
# Note: Case Sensitive search | |
grep "InnoDB" logfile.log | |
2014-04-22 15:36:22 1022 [Note] Shutting down plugin 'InnoDB' | |
2014-04-22 15:36:22 1022 [Note] InnoDB: FTS optimize thread exiting. | |
2014-04-22 15:36:22 1022 [Note] InnoDB: Starting shutdown... | |
2014-04-22 15:36:24 1022 [Note] InnoDB: Shutdown completed; log sequence number 1626077 | |
2. # Searching and counting match in file # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. # Sadece Butun logfile-i oxuyur print edir. | |
awk '{print $0}' logfile.log --- print the entire line. | |
2. # Her setrden ilk column, field-i cixardir | |
awk '{print $1}' logfile.log | |
3. # Ilk olaraq 2ci field daha sonra 1ci field-i cixardir | |
awk '{print $2,$1}' logfile.log | |
4. # Regex-den istifade etmekle search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. # Print first line | |
sed -n '1p' apa_az_news.sql | |
2. # Print last line | |
sed -n '$p' apa_az_news.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mysql.connector | |
from mysql.connector import Error | |
try: | |
cnx = mysql.connector.connect(user='remote2', password='Pass@123#', host='192.168.1.77', database='world') | |
except Error as err: | |
print err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mysql.connector | |
from mysql.connector.constants import ClientFlag | |
from mysql.connector import Error | |
config = { | |
'user': 'ssluser', | |
'password': 'Pass@123#', | |
'host': '192.168.1.77', | |
'database':'world', | |
'client_flags': [ClientFlag.SSL], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install build-essential vde2 virtualbox-guest-additions-iso |
OlderNewer