Category Archives: Projects

Git Workflow Guide


# 0a. Fork the repo.
git-workflow-guide 0a.i git-workflow-guide 0a.ii
# 0b. Clone the repo.

git-workflow-guide 0b

Joe:projects joeflack4$ git clone
Cloning into 'commcare-hq'...
remote: Counting objects: 846675, done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 846675 (delta 104), reused 109 (delta 50), pack-reused 846472
Receiving objects: 100% (846675/846675), 415.87 MiB | 6.85 MiB/s, done.
Resolving deltas: 100% (627831/627831), done.
Checking out files: 100% (7490/7490), done.

# 0c. Make a virtual environment. I use virtualenvwrapper.

Joe:projects joeflack4$ mkvirtualenv commcare-hq
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/joeflack4/virtualenvs/commcare-hq/bin/python3
Also creating executable in /Users/joeflack4/virtualenvs/commcare-hq/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/joeflack4/virtualenvs/commcare-hq/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/joeflack4/virtualenvs/commcare-hq/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/joeflack4/virtualenvs/commcare-hq/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/joeflack4/virtualenvs/commcare-hq/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/joeflack4/virtualenvs/commcare-hq/bin/get_env_details

# 0d. Activate your virtual environment.
# Using virtualenvwrapper, this is done like so:

Joe:commcare-hq joeflack4$ workon commcare-hq
(commcare-hq) Joe:commcare-hq joeflack4$
# 0e. Change directory to the repo.
(commcare-hq) Joe:projects joeflack4$ pwd
(commcare-hq) Joe:projects joeflack4$ cd commcare-hq/
(commcare-hq) Joe:commcare-hq joeflack4$ pwd
(commcare-hq) Joe:commcare-hq joeflack4$ ls
CONTRIBUTING.rst app_builder_live_test docs locale
# ...and so on.

# 0f. Set up remote to trunk.

(commcare-hq) Joe:commcare-hq joeflack4$ git remote -v
origin (fetch)
origin (push)

git-workflow-guide 0f

(commcare-hq) Joe:commcare-hq joeflack4$ git remote add trunk
(commcare-hq) Joe:commcare-hq joeflack4$ git remote -v
origin (fetch)
origin (push)
trunk (fetch)
trunk (push)

# 1. You have a change you want to make.

# 2. You checkout a new branch based from the develop branch of the trunk repo.

(commcare-hq) Joe:commcare-hq joeflack4$ git branch
* develop
(commcare-hq) Joe:commcare-hq joeflack4$ git checkout -b my-new-feature-branch
Switched to a new branch 'my-new-feature-branch'
(commcare-hq) Joe:commcare-hq joeflack4$ git branch
* my-new-feature-branch

# 3. You work, adding commits to this “feature branch” (even if what you’re doing is not adding/updating a specific feature).
# I made some changes to the .gitignore.

(commcare-hq) Joe:commcare-hq joeflack4$ git status
On branch my-new-feature-branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified: .gitignore

no changes added to commit (use "git add" and/or "git commit -a")
(commcare-hq) Joe:commcare-hq joeflack4$ git add .
(commcare-hq) Joe:commcare-hq joeflack4$ git commit -m "Updated gitignore."
[my-new-feature-branch d0b7774] Updated gitignore.
1 file changed, 1 insertion(+)

# Might as well push changes to Github while I”m at it.

(commcare-hq) Joe:commcare-hq joeflack4$ git push
fatal: The current branch my-new-feature-branch has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin my-new-feature-branch

# Woops! Forgot to set an upstream branch on Github.

(commcare-hq) Joe:commcare-hq joeflack4$ git push --set-upstream origin my-new-feature-branch
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 291 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
* [new branch] my-new-feature-branch -> my-new-feature-branch
Branch my-new-feature-branch set up to track remote branch my-new-feature-branch from origin.

# 4. When ready, make a pull request to the develop branch of the trunk repo.

(commcare-hq) Joe:commcare-hq joeflack4$ git home

# Doing ‘git home’ opens git in the browser.

git-workflow-guide 4a

git-workflow-guide 4b

# 5. The pull request is reviewed, some code review / change requests may be provided, and ultimately once the review is passed, the merge is accepted into develop.

# 6. If no testing is needed, skip to step 9. If testing is needed, continue with this step: When ready to deploy changes for testing, the staging branch merges changes from the develop branch.

# 7. Staging branch is pushed to staging instance.

# 8. Testing is done on the staging instance.

# 9. When testing on staging is complete, develop is merged into the master or production branch.

# 10. Master or production branch is pushed to the production instance.

# 11. Testing is done on the production instance.

# 12. When testing on production is complete, the workflow is finished. Your change has been implemented!

Just-a-Dash ERP Dashboard


Just-a-Dash ERP Dashboard Just-a-Dash application is a light-weight, mobile friendly, scaffolded EMS (Enterprise Management System) platform. For our purposes, EMS is synonymous with the more common term ‘ERP’ (Enterprise Resource Planning).


Just-a-Dash uses a highly modular SOA (Service Oriented Architecture) on both the front and back ends. The technology stack is as follows,


As of right now, no user or development documentation exists. But it will.


Contribution is encouraged. While Just-a-Dash’s documentation is currently sparse, it is however straightforward and easy to learn, and the technologies it is built on are robust and well documented. Feel free to reach out to me, and I will assist in any way possible.

  • Data Storage: Your choice of RDBMS.
  • Server Languages/Frameworks: Python, with MVC in Flask.
  • Client Languages/Frameworks: HTML/CSS/JS, with UI in Bootstrap, themed with AdminLTE.


Local Installation

The recommended method is virtualenv, with pip. The included requirements.txt lists dependencies, and is used by virtualenv, and Heroku (if deploying online) for installation of these dependencies. I highly recommend The Flask Mega Tutorial , Part I (& onwards) of which can be used as a guide for installation of this application.

Online Deployment

I recommend Heroku as a PaaS. If using Heroku, it will utilize the included requirements.txt file and Procfile to build and run your application.

EMS Modules

Released Modules

Currently none.

Modules in Development

  • HRM (Human Resources Management System)
  • OMS (Operations Management System)
  • DES (Data Extrapolation System)
  • CRM (Customer Relationship Management)
  • BMS (Billing Management System)
  • Interface for External AMS (Accounting Management Systems)


Mobile Alpha 01

SCC File Renamer

SCC File Renamer



SCC File Renamer is a script that will flip the order of 2 strings within the filenames of a batch of files, so long as the filenames are of the following syntax:

MainString1 #### MainString2 – SuffixString

Applications for Usage

I use this script at work on a weekly basis, for the purpose of keeping a sorting timesheets in order by either client/project or employee. Below is an example of an application of this filename syntax that is typically used in my current workplace, as well as how the filename would be converted.

ProjectA MMDD EmployeeD – Notes yada yada


EmployeeD MMDD ProjectA – Notes yada yada

This is very useful for renaming a large number of such files at once.

Common Issues

  • Windows does not allow Powershell scripts to be run by default, for security reasons. If you haven’t already, make sure to enable running of PS scripts.
  • Make sure that there are no spaces in the path with which you run the file from.

How to Use

Two files are included, but they do the same thing. The only difference is that one runs with user prompts, and the other executes automatically.

Non-Windows Operating Systems

There do exist means with which to run Powershell scripts on non-Windows operating systems. Unfortunately I do not know the details, so I would be unable to support any such issues ;(.


The script is written in Powershell. Windows 7 and later versions come with Powershell installed, but for prior versions of Windows, you will need to install it first.

First, you should clone this repository. Then you will need load powershell first and run the script manually. Optionally and even better, you can set your system’s .ps1 files to open with Powershell by default. Doing this will allow you to run by double clicking.

Some sample files have been included. Feel free to run the script on these files to see it in action!