Skip to content

Instantly share code, notes, and snippets.

View HarshadRanganathan's full-sized avatar
💭
Buy me a coffee (https://ko-fi.com/harshadranganathan)

Harshad Ranganathan HarshadRanganathan

💭
Buy me a coffee (https://ko-fi.com/harshadranganathan)
View GitHub Profile
@HarshadRanganathan
HarshadRanganathan / .hyper.js
Created November 5, 2019 16:56
Hyper config file using git bash shell
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@HarshadRanganathan
HarshadRanganathan / kafka.properties
Last active August 18, 2022 10:48
Kafka Commands
security.protocol=ssl
ssl.enabled.protocols = TLSv1.2,TLSv1.1,TLSv1
ssl.endpoint.identification.algorithm=
@HarshadRanganathan
HarshadRanganathan / kali_linux_tools
Last active April 20, 2020 15:29
Kali Linux Tools
# metagoofil - extracting metadata of public documents (pdf,doc,xls,ppt,docx,pptx,xlsx) belonging to a target company
metagoofil -d domain.com -t doc -o temp
# harvester - gather emails, subdomains, hosts, employee names, open ports and banners from different public sources like search engines, PGP key servers and SHODAN computer database
theHarvester -d domain.com -b google -l 100
@HarshadRanganathan
HarshadRanganathan / .scalafmt.conf
Created April 21, 2020 17:55
Scalafmt Recommended Configuration
style = defaultWithAlign
align.openParenCallSite = false
align.openParenDefnSite = false
align.tokens = [{code = "->"}, {code = "<-"}, {code = "=>", owner = "Case"}]
continuationIndent.callSite = 2
continuationIndent.defnSite = 2
danglingParentheses = true
indentOperator = spray
maxColumn = 100
@HarshadRanganathan
HarshadRanganathan / settings
Last active July 2, 2020 21:59
Windows Terminal Settings
// This file was initially generated by Windows Terminal 0.11.1191.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
// convert all files to webp format with quality ratio of 80
for file in img/*; do cwebp -q 80 "$file" -o "${file%.*}.webp"; done
// convert images based on google's recommended sampling factor, quality and interlace
magick mogrify -sampling-factor 4:2:0 -strip -quality 75 -interlace JPEG -colorspace RGB -format jpg *.png
magick mogrify -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB *.jpg
@HarshadRanganathan
HarshadRanganathan / .zshrc
Last active August 31, 2022 10:08
Zsh Profile
# Fig pre block. Keep at the top of this file.
. "$HOME/.fig/shell/zshrc.pre.zsh"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/harshad/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@HarshadRanganathan
HarshadRanganathan / docker_commands
Created January 11, 2021 12:15
Docker commands
# Run Docker Local Registry
docker run -d -p 5000:5000 --restart=always --name registry registry:2
1. I see that most of your connections and queries are running on the master(writer) database instance itself without much load on the reader instance. You can consider dividing your workload such that read-only queries/workloads are directed to the reader instance, and only write queries are handled by your writer instance. This will help alleviate the large undo logs(RollbackSegmentHistoryListLength) due to long running queries and in itself this should mitigate a lot of the performance issues.
One way to achieve splitting of Reads and Writes is by making use of a third party software Proxy solution which can split reads and writes to the appropriate endpoints. Below are a few example software solutions which you can consider:
[+] ProxySQL - https://proxysql.com/
[+] Heimdall Data - https://www.heimdalldata.com/
2. If and where possible, try to split large transactions into multiple smaller transactions. This will again reduce the growth of the undo log which seems to be the main cause of t
export JAVA_HOME_8=$(/usr/libexec/java_home -v1.8)
export JAVA_HOME=$JAVA_HOME_8
[[ -s "/Users/hrangana/.gvm/scripts/gvm" ]] && source "/Users/hrangana/.gvm/scripts/gvm"