Skip to content

Instantly share code, notes, and snippets.

View ckabalan's full-sized avatar

Caesar Kabalan ckabalan

View GitHub Profile
@ckabalan
ckabalan / best_bash_history.sh
Last active October 6, 2025 10:48
The Best Bash History Settings Ever
# /etc/profile.d/best_bash_history.sh
# Save 5,000 lines of history in memory
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
@ckabalan
ckabalan / best_bash_prompt.sh
Last active June 21, 2025 07:38
The Best Bash Prompt
# Bash History Replacement Script
# Author: Caesar Kabalan
# Last Modified: June 6th, 2017
# Description:
# Modifies the default Bash Shell prompt to be in the format of:
# [CWD:COUNT:BRANCH:VENV]
# [USER:HOSTNAME] _
# Where:
# CWD - Current working directory (green if last command returned 0, red otherwise)
# COUNT - Session command count
@ckabalan
ckabalan / PPT-Diagram-Tips.md
Last active August 23, 2024 05:31
PowerPoint Architecture Diagram Tips

PowerPoint Architecture Diagram Tips

Why PowerPoint for Diagrams?

  • Everyone has Microsoft PowerPoint or something PowerPoint compatible. Visio is dated and doesn't work on MacOS. There are too many different LucidCharts/DrawIO/Diagrams.net competitors and no clear winner, so you have a 1/3 chance of someone having your chosen tool. YOu have a 95% chance of someone having PowerPoint.
  • PowerPoint gives you amazing flexibility in the design of your diagram using familiar configuration options people have used in Word and PowerPoint for literally 30 years.

Tips for Drafting a Diagram

  • Create a blank slide, and change your slide size to be huge. Design Tab > Slide Size > Page Setup. I use a Width of 30in and Height of 20in.
#define ADDRESS_U10_A 0x14
#define ADDRESS_U10_A_CONTROL 0x15
#define ADDRESS_U10_B 0x16
#define ADDRESS_U10_B_CONTROL 0x17
#define ADDRESS_U11_A 0x18
#define ADDRESS_U11_A_CONTROL 0x19
#define ADDRESS_U11_B 0x1A
#define ADDRESS_U11_B_CONTROL 0x1B
@ckabalan
ckabalan / gist:84197739d839ff6c6cb42520331f717a
Last active September 14, 2019 18:52
CloudFormation Package Issue
> git clone https://github.com/passthesecret/serverless.git
Cloning into 'serverless'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 75 (delta 29), reused 62 (delta 16), pack-reused 0
Unpacking objects: 100% (75/75), done.
> cd serverless
> git checkout 4033970
[ ... SNIP ... ]
@ckabalan
ckabalan / putty_molokai.reg
Last active August 4, 2019 08:08
PuTTY Molokai Theme
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Molokai]
"Colour0"="187,187,187"
"Colour1"="187,187,187"
"Colour2"="18,18,18"
"Colour3"="18,18,18"
"Colour4"="255,255,255"
"Colour5"="187,187,187"
"Colour6"="18,18,18"
@ckabalan
ckabalan / gist:ece142637c6394a1acfa1cb7d7ae0c3d
Created August 2, 2019 21:05
ZSH Activate/Deactive Virtual Environment
venv () {
if ((${+VIRTUAL_ENV})); then
echo "Deactivating Virtual Environment: $VIRTUAL_ENV"
deactivate
else
VENV_PATH=${PWD:gs/\/home\/ckabalan\//\/home\/ckabalan\/.virtualenv\//}
ACTIVATE_PATH=$VENV_PATH/bin/activate
if [[ -e $ACTIVATE_PATH ]]; then
echo "Activating Virtual Environment: $VENV_PATH"
source $ACTIVATE_PATH
@ckabalan
ckabalan / gist:fc728f183cf3e5039b623a25df6664d2
Last active June 3, 2019 22:39
AWS Run Across Accounts / Regions
aws_all_div () {
COMMAND=`cat`
API_LIST=(
'profile_name_1 region_1'
'profile_name_2 region_1'
'profile_name_3 region_1'
'profile_name_1 region_2'
'profile_name_2 region_2'
'profile_name_3 region_2'
'profile_name_1 region_3'
@ckabalan
ckabalan / PerfectPuTTYSettings.reg
Created February 11, 2019 23:08
Perfect PuTTY Settings
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\SimonTatham]
[HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY]
[HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Jumplist]
[HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions]
@ckabalan
ckabalan / .zshrc
Created April 1, 2018 06:07
.zshrc
# Use SourceCodePro from https://nerdfonts.com/#downloads
TERM=xterm-256color
#POWERLEVEL9K_MODE='nerdfont-complete'
#POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_MODE='awesome-patched'
# Put icons here since they appear to get overwritten at some point...
# http://nerdfonts.com/#cheat-sheet
# https://github.com/bhilburn/powerlevel9k/blob/master/functions/icons.zsh