Skip to content

Instantly share code, notes, and snippets.

View dharmendrakariya's full-sized avatar
🚩
Jay Shree Ram

dharmendra kariya dharmendrakariya

🚩
Jay Shree Ram
View GitHub Profile
@codersquid
codersquid / another_example.py
Last active June 25, 2024 00:56
a learning example for using a pushgateway with prometheus
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active July 21, 2024 05:14
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@shyamvyas5
shyamvyas5 / psql-backup-restore-commands.md
Last active October 2, 2023 14:30
Commands for backup and restore of postgresql database
For backup,
pg_dump -W -U <DB_USERNAME> <DB_NAME> -h <DB_HOST> -p <DB_PORT> --no-owner > <PATH_FOR_FILE>.sql
For backup of database with INSERT statements in the dump file instead of COPY statements,
pg_dump -W -U <DB_USERNAME> <DB_NAME> -h <DB_HOST> -p <DB_PORT> --no-owner --inserts > <PATH_FOR_FILE>.sql
@shyamvyas5
shyamvyas5 / mysql-backup-restore-commands.md
Created April 21, 2022 08:23
Commands for backup and restore of mysql database
For backup of all databases,
mysqldump -u <DB_USER> -p --all-databases --host <DB_HOST> -P <DB_PORT> > <PATH_FOR_FILE>.sql
For backup of a specific database,
mysqldump -u <DB_USER> -p <DB_NAME> --host <DB_HOST> -P <DB_PORT> > <PATH_FOR_FILE>.sql
@shyamvyas5
shyamvyas5 / README.md
Last active October 2, 2023 14:29
getting count of 4xx and 5xx logs from the logs file