Skip to content

Instantly share code, notes, and snippets.

View nitredd's full-sized avatar

Nitin Reddy nitredd

  • Dubai
View GitHub Profile
@nitredd
nitredd / group_bytes_read_by_driver.sh
Created August 27, 2025 08:53
This script returns the sum of bytes read, grouped by the driver, from the MongoDB log file
#!/bin/bash
# Author: Yuvi Herziger
set -euo pipefail
LOG_FILE="$1"
if [[ -z "$LOG_FILE" ]]; then
echo "Error: Log file path not provided." >&2
echo "Usage: $0 /path/to/logfile" >&2
@nitredd
nitredd / dbHashVerifier.js
Created August 23, 2025 17:39
Verification after data migration between MongoDB clusters
/*
Author: Katkam Nitin Reddy < redknitin [at] gmail [dot] com >
Date: September 26, 2022
Description: This script uses the dbHash command to compare the source and destination clusters
Using the Mongo shell, connect to the source cluster and run this script
This script needs write access to the target cluster to write the log
*/
//Commented this out - We are no longer writing to a log; console output only
@nitredd
nitredd / win7.txt
Created April 16, 2025 14:15
Windows 7 updates for 2025
Windows 7 updates in 2024 - install SP1, then KB3102810 Update
https://www.youtube.com/watch?v=BtexOkSWSB0
Windows 7 Service Pack 1 (x86) - https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbVFwYkNsWjl1bjctYUJnT1VVVU5XRjFxYkwyZ3xBQ3Jtc0tuTlZ4ZlNhNExlRUNRcFAtak1xUkFDN2xMSzhLeG9iTkhWUktWMDFVcDI0YVp2NjJpbUlfZ2l3ak9VNXFHY1VGQjM4YnZOaWFXRWFaRXFVam1iQ3g5WmFhd1J6MV9ibVFTZ3VaSWxKZkVBa1pJbllMZw&q=https%3A%2F%2Fcatalog.s.download.windowsupdate.com%2Fmsdownload%2Fupdate%2Fsoftware%2Fsvpk%2F2011%2F02%2Fwindows6.1-kb976932-x86_c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa.exe&v=BtexOkSWSB0
► Windows 7 Service Pack 1 (x64) - https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbXNOMGhLdDRvcjFjVjY4WXZPQnJNM0trSmxnUXxBQ3Jtc0tuZTQxdXI3X2lrS3EweWFJZ0IzckZUMFpySkJRQVdCdnNrNmpIdHVKbTVNYXM2aUkzQzZCTGZiTHFDZ2ZESWVlTEp5eFV4aGVMdWdVZzZ2bl9vaHJQMEVydTYwdkREV0daZGFFaUJKRXctWENPM1FUcw&q=https%3A%2F%2Fcatalog.s.download.windowsupdate.com%2Fmsdownload%2Fupdate%2Fsoftware%2Fsvpk%2F2011%2F02%2F
@nitredd
nitredd / main.c
Created July 25, 2021 12:53
Parsing the Wire Protocol in C. I also wrote a Ruby version earlier, WireProto.
#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <string.h>
void processMessage(int);
struct wire_proto_message {
unsigned int msgLen;
unsigned int requestId;