Dealing with PATH, Bash Profiles, Git config in Windows

This post serves as a convenience for me and possibly others (probably not because nobody develops on windows) on how to manage working within Git Bash and Command Line in general within Windows 10. It can be a real pain in the neck to develop on Windows. (Updated for 11 in 2023!)

I primarily use Windows because my life is between software and business.

XKCD #763

Git Bash Notes

Windows PATH Tips/Instructions:

  • Control Panel > System > Advanced > Environment Variables
  • Edit Path to add a folder or System Variable
    • Add a folder: Point the resource you need by adding a folder path without the .exe
    • Add a System Variable: First point the directory and assign a variable name by adding to the System Variables. Next append the name of the variable to the Path ( ex. %JAVA%; ).
  • Windows Environment Variable added without restarting (ha):
    Or you know, just fucking reboot
  • Add things for convenience like c:/eclipse/ and then simply type eclipse to open the IDE

.bash_profile Examples:

# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Suppress message about using zsh
# ————————————
# MOTD (Message of the Day)
# What you see when Terminal opens
# ————————————
echo "—————————-"
echo "Loaded ~/.bash_profile"
echo ""
echo "To edit run: configedit"
echo "To refresh run: configrefresh"
echo "All aliases: alias"
echo "—————————-"
# ————————————
# Configure prompt
# Includes special handling for git repos
# ————————————
# Regular Colors
# Reset colors
# When in a git repo, this method is used to determine the current branch
function parse_git_branch {
git branch 2>/dev/null | grep '^*' | sed 's_^..__' | sed 's_\(.*\)_(\1)_'
# When in a git repo, this method is used to determine if there are changes
# Changes will be indicated in the prompt by a *
function git_dirty {
if [[ -n $(git status -s –ignore-submodules=dirty 2> /dev/null) ]]; then
echo "*"
echo ""
# Design the prompt
export PS1="$Purple\w$NONE \$(parse_git_branch)$Red \$(git_dirty) $NONE\$ "
# \w shows the current path
# List of other placeholders you can use:
# ————————————
# ————————————
# Edit .bash_profile
alias configedit='code ~/.bash_profile'
# Force terminal to recognize changes to .bash_profile
alias configrefresh='source ~/.bash_profile'
# Ideal directory listing
alias ll="ls -laFG"
# Ask before removing files
alias rm='rm -i'
# Add your own aliases here…
view raw .bash_profile hosted with ❤ by GitHub

My .bash_profile:

# go to the root directory of my development environment on startup
cd 'C:\dev'

# set aliases for commonly used applications
alias np='start notepad++'
alias c='code .'
alias dock='docker-compose up'
alias dockb='docker-compose.exe run app --entrypoint run build:dev'
alias histg='history | grep'
alias g='git'

# save history and persist across multiple bash windows
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"

SSH – I no longer use this (2023) as I now run the service via Windows:

# ssh things

agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }

agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }


# optional SSH key handling
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
# agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)

if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then

unset env

My .gitconfig

[color "diff"]
meta = yellow bold
st = status
ch = checkout
co = commit
s = status
p = pull
d = diff

Plan, Develop, & Deploy Applications using Azure DevOps

I am not affiliated with Microsoft, with any of their offerings, or employees. This post is my perspective.

Developing an application is more than just code. It involves organizational process, division of labor, and the careful implementation of requirements. To manage this, some teams use multiple suites of tools, frameworks, rules, methodologies, the list goes on…

Azure DevOps gives you a suite of tools, they call “dev services”. Let’s go through them:

  1. Dashboards – View metrics about your developed applications
  2. Boards / Items / Backlog / Sprints – A place for you and your team to plan and assign work
  3. Repos – Store your application code repositories (Git driven)
  4. Pipelines – Automated build and deployments from your repositories to cloud platforms / infrastructure
  5. Test Plans – Paid test manager extension…
  6. Artifacts – Fully integrated package management (private libraries of software)

Assign work items to others on your team, track State (Started) and Reason (Work started), Assign priority, effort/actual hours, assign a Work Branch from a Repo, and Relate it to other issues. Using BitBucket daily for work, I found it to be a relatively painless switch to the overall UI.

I cannot seem to find a way to view all issues. You also cannot update issues in a large table grid view. You can batch update, which requires you to enter a separate view (BitBucket is no better!).

Users can take their issue branches and make pull requests, offering teams with the ability to peer review code before merging to the baseline (master branch). One can manage version of the software via Tags.

To deploy your applications, you can use a suite of ready made templates. There are a wealth of choices. Docker, Node, Yaml, .Net, Android, and so many more. You can even create your own pipeline by following these instructions.

Let’s hope their feature request system is improved and receives backing from Microsoft. Because, I think this could be an awesome extension to Azure.

Featured image:

Intel Kernel Row Hammer Exposure

A massive vulnerability in Intel CPU memory architecture is being addressed by operating system platforms including Windows. Primarily, virtualization performance will be affected by up to 30%, according to an article published by Extreme Tech. More information on Row Hammer vulnerability can be found here. I predict that this will have implications on cloud performance and affordability. In addition, we may see some reduction in investor confidence in Intel stock in coming months.

Mount Agung Volcano Eruption Soon?

I saw that the Mt. Agung Volcano was active and under an evacuation warning earlier today. Out of curiosity, I googled around to find out more about how I could know up to the minute what was going on with it. To weed out the nonsense from the real information I used the following query: Mount Agung seismic activity -news -guardian -express -cnn and went to page 3 or 4 to find the following:

Huge Map with Live updates on all Earthquakes in the same region of Indonesia:

Jakarta Post news article from Sept 25 (6 days from today!):

Some serious details about the type of monitoring performed by an org. called WOVO:

8 Steps to Your Own NextCloud!

1. Go to
2. Download OVA for ESXI/VM Deployment
3. Install to VM Hypervisor
4. Setup Domain to point to WAN IP via A record
5. Set Static IP to Local VM IP
6. Open 443 on Router to Local VM IP
7. Login and follow instructions, install optional addons as you wish
8. To resize, follow

Linux Shell history Output, Ch. 01 of Ruby on Rails Tutorial

The following is output after running history command in a C9 Console ( where I am attempting my first Ruby on Rails application (Tutorial: using the Cloud 9 web IDE. Impressive amount of functionality after limited configuration. Going from zero to running application in ~50 commands is a rare feat today with how complicated the web stack world can be. Even have two environments running: prod and dev by using Heroku to deploy prod.

Project Console History Output (console 1)
Get Ruby Version
1 ruby -v
Setup Git/Bitbucket
2 git config --global "your name"
3 git config --global

Quick aside: Server Daemon Console history output (console 2)
Install rails
1 gem install rails -v 5.1.2
Make rails app on c9
2 rails _5.1.2_ new hello_app
Goto app dir
4 cd hello_app/
Quickly read README
6 cat
Quickly read Rakefile
8 cat Rakefile
9 ls

Troubleshoot bundle (dependency mgmt)
10 bundle install
11 bundle update listen

Update bundle of Gems after modifying Gemfile due to version differences
12 bundle update
13 bundle install

Spin up local rails server without params
14 rails server
Spin up rails server with params
15 rails server -b $IP -p $PORT
Create a new Git repo
7 git init
Add files to Git repo using gitignore
8 git add -A
Check status of working tree in Git
9 git status
Make a commit to repo with added files
10 git commit -m "Init repo"
Take a look at SSH for BitBucket setup
11 cat ~/.ssh/
Returning to Project Console (console 1) History Output
Add SSH key for use with BitBucket
16 git remote add origin ssh://
Push to origin current repo, failed because of bad syntax
17 git push -u origin all
Check status of repo
18 git status
Check log of repo
19 git log
Create a master branch to troubleshoot failed push
20 git checkout -b master
Realized my username was wrong for use with BitBucket
21 git config --global "username"
Pushed again, correct syntax this time
25 git push -u origin --all
Checkout to newly created modify branch for Readme work
26 git checkout -b modify-README
See branches for heck of it
27 git branch
Commit changes to repo
29 git commit -a -m "Update readme"
Go back to Master branch
30 git checkout master
Merge branches
31 git merge modify-README
Remove modify branch
32 git branch -d modify-README
Push changes
33 git push
Check status again
34 git status
Modify Gemfile to include :development and :production
35 bundle install
38 bundle install --without production
39 git commit -a -m "Update Gemfile for Heroku"

Check Heroku version for deployment to production
40 heroku version
Setup Heroku
41 heroku login
42 heroku keys:add

Create Heroku Virtual App Instance
44 heroku create
45 git push heroku master
46 git commit -a -m "Update Gemfile for Heroku"

Check on Heroku Virtual App Instance
49 heroku help
50 heroku status
51 heroku sessions
52 heroku webhooks

See progress of issued commands in the Console Window
53 history

This concludes Chapter 1 output. I will post subsequent chapters as I complete them. My goal is to revisit the process I go through to reinforce learning and identify where I made mistakes for future avoidance and for more understanding.

Java AOP

AspectJ Notes: Aspect Oriented Programming allows you to achieve an extra level of separation of concerns ontop of OOP methodology.

Key terms:
– Pointcut defines wherein the code a joinpoint (injection is what they should’ve called it) will occur.
– Advice defines what happens at the specific joinpoint.
– Weaving is the process of injecting the advice into the joinpoints.

Example code:

public aspect LicenseFee {

// playing with this to see if I can get this to work
// eclipse constantly checks to see if you actually are implementing the method before weaving occurs
// almost like it actively weaves before runtime, no wonder my computer is so slow running this thing
// so that means that when I go to run tests, some errors may occur but it should be okay/runnable despite the fact

pointcut test(): target(Main) &&
(call(void testSaveAccount()));

after(): test(){
System.out.println("TestSaveAccount called");

pointcut test2(): target(Main) &&
(call(void testOpenAccount()));

before(): test2(){


Eclipse Semantics for Advice

DigitalOcean Ubuntu 14.04 User SSH Setup

ssh root@ip
adduser username
gpasswd -a username sudo
Copy Public Key to Clipboard
su username
mkdir .ssh
sudo chmod 700 .ssh
nano /.ssh/authorized_keys/
Paste Public Key from Clipboard
chmod 600 /.ssh/authorized_keys/
Return to Root User
nano /etc/ssh/sshd_config/
PermitRootLogin no
service ssh restart
ssh username@ip