Dealing with PATH and Bash in Windows 10

This post serves as a convenience reminder to myself and possibly others 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 deal with PATH.

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):
  • Add things for convenience like c:/eclipse/ and then simply type eclipse to open the IDE

.bash_profile/.bashrc Examples:

My example .bash_profile:

# Upon open go to my dev directory
 cd 'C:\Users\AlexanderRamsey\dev'

# Launch Sublime in current dir
 alias sublime='subl.exe .'
 # Launch python in git bash
 alias pyth='winpty py'
 # Search history. Example usage: histg foo
 alias histg="history | grep"

# Handle history among multiple windows
 # Avoid duplicates
 export HISTCONTROL=ignoredups:erasedups 
 # When the shell exits, append to the history file instead of overwriting it
 shopt -s histappend
 # After each command, append to the history file and reread it
 export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"

Sublime Text Config File

 "font_size": 12,
 "hot_exit": false,
 "remember_open_files": false,
 "tab_size": 4,
 "theme": "Adaptive.sublime-theme"

Or you know, just use Linux.

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

Opinion: Modernization of Government

I work for a government entity as a contractor and I have found that my experience with this entity provides a very interesting glimpse into the reality of today’s government. The unfortunate reality is that our government is very much seated in the past. A reactive blob of people and money that moves slowly toward an ever moving target.

Organizations that profit, those that win are proactive, forward thinking, and ripe with change. Their actions determine their own futures. Infrastructure is built and designed according to their own agenda, rather than being fastened by another’s platform.

The new administration wants to, at least from what I have seen, enact widespread change and an overall shrinking of the unnecessary machine that cranks on and on. For this agenda, I wish them luck. And if this were their saving grace for other stances, then so be it that they move toward those goals. However, I believe this issue of government modernization to be at the forefront of our new reality.

We must adapt, accept change, and be unpredictable. Systems are only as strong as their weakest link. And, unfortunately the government has many weak and costly links unseen to the powers at be.

Where I see this link is in the modernization of infrastructure pertaining to the information technology of our most critical defense platforms. These systems and contracts are generally performed as an outsourced contract to a major corporation or group of corporations. And, unfortunately the contract process is what drives this slow to change realm.

Staffing, turnover, and attrition combined with an architecture designed to close the borders of all vulnerability present an inherent risk to the evolution of our tech ecosystems.

The private sectors are moving past this realm and are simply leaving our governments behind. Disruptive changes are not foreseen and many times not reacted upon until the government has begun to adopt an already outdated process or system.

Summing it up, I believe that if there is anything good that could come out of the new administration, it may be the fact that scrutiny-laden eyes now view all existing systems and infrastructures. That the button pushers of yesterday may have to find work elsewhere tomorrow, to make room for the next evolution of technical infrastructure development.

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