Skip to content

Instantly share code, notes, and snippets.

View chetanyachopra22's full-sized avatar
👨‍💻
exploring

Chetanya Chopra chetanyachopra22

👨‍💻
exploring
  • Paytm, India
  • Bengaluru, Banaglore, Karnataka
  • 10:41 (UTC -12:00)
View GitHub Profile
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 14, 2024 15:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@epicserve
epicserve / redis_key_sizes.sh
Last active November 10, 2024 13:47
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}