Skip to content

Instantly share code, notes, and snippets.

View meet59patel's full-sized avatar
👨‍💻
Building Something Special

Meet Patel meet59patel

👨‍💻
Building Something Special
View GitHub Profile
@meet59patel
meet59patel / GSoC_2020.md
Last active November 24, 2022 10:15
GSoC-2020 with Percona - Documented

Google Summer of Code 2020 @Percona

Refactor PMM-Framework

About the Project

PMM (Percona Monitoring and Management) is an open-source platform for managing and monitoring MySQL, Percona Server, PostgreSQL, MongoDB, and Percona XtraDB Cluster performance. PMM integrates open source tools like Prometheus, Grafana, Clickhouse, etc. to facilitate different features. PMM-framework is the internal automated testing framework, used to set up PMM with various databases and their multiple instances, perform load tests, and wipe everything after tests are done. PMM-Framework also incorporates multiple other scripts and tools for further extended functionalities.
The core objectives of

Installing Guest Additions - Windows Host - Ubuntu Guest VM

Source: unix.stackexchange.com

sudo apt remove 'virtualbox*'
sudo apt autoremove

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo add-apt-repository 'deb https://download.virtualbox.org/virtualbox/debian bionic contrib'
@meet59patel
meet59patel / 1. Structure.md
Last active August 20, 2020 08:22
Set up PMM

Structure

PMM-Server: The central part of PMM that aggregates collected data and presents it in the form of tables,dashboards, and graphs in a web interface.

PMM-Client: It installed on every database host that you want to monitor. It collects server metrics, general systemmetrics, and Query Analytics data for a complete performance overview.

@meet59patel
meet59patel / 1.md
Last active March 30, 2020 20:37
Search Docker Tags

This script uses DockerHub registry API v2, which returns JSON response of tags in paginated manner. So the script...

  1. Fetches the response (using curl)
  2. Takes out all the versions returned on a single page (using python)
  3. Goes to the next page, repeats steps 1 and 2
  4. Makes a list at every iteration and prints it out at the end.
@meet59patel
meet59patel / UpgradeAllPipPackages.py
Last active February 11, 2020 12:55
UpgradeAllPipPackages
#https://stackoverflow.com/a/5839291
import pkg_resources
from subprocess import call
packages = [dist.project_name for dist in pkg_resources.working_set]
for package in packages:
call("pip install --upgrade " + str(package), shell=True)
# call("pip install --upgrade " + ' '.join(packages), shell=True)
@meet59patel
meet59patel / 1.Django + venv Setup
Last active February 24, 2024 23:33
Getting started with Django (2.2.4) - with virtual env setup
Make your project directory.
Open terminal with the project directory as current directory.
Make sure python3 and pip installed on system.
Run this command: $ python3 -m venv myvenv
virtual environment called 'myenv' has been created for your current project.
To activate the virtual environment: $ source myvenv/bin/activate
Make requirements.txt file in main project directory. Add this line: Django~=2.2.4
(You can add more requirements later.)
Save requirements.txt file and run this command: $ pip install -r requirements.txt
Above will install current requirement python packages to the virtual environment.