--> Justin James

Add Table of Contents to Markdown

github/ markdown/ blogging/ npm

When you are writing tutorials that are broken up by sections it is nice to have a table of contents at the top to help the users navigate. However, maintaining this by hand is a no go. Luckily there is a great npm package called doctoc that will look at the headings in your markdown file and generated a table of contents for you. Table of Contents Sample Using This Post

Read More ›

Sync your Git Fork to the Original Repo

git/ github

Syncing your forked repository to the original repository is an important step before submitting any pull request to the original repository for the changes in your forked repository. Even if you are not going to submit a pull request to the original repository, there are times that you want the additional features and/or bug fixes that have been done since you forked the original repository. You could do a pull request but this adds an additional commit into your forked repository instead of making your forked repository match the original repository.

Read More ›

Sync your Git Fork to the Original Repo

git/ github

Syncing your forked repository to the original repository is an important step before submitting any pull request to the original repository for the changes in your forked repository. Even if you are not going to submit a pull request to the original repository, there are times that you want the additional features and/or bug fixes that have been done since you forked the original repository. You could do a pull request but this adds an additional commit into your forked repository instead of making your forked repository match the original repository.

Read More ›

Add Git Branch Name to Bash Prompt

git/ github

When I am working on a git repository and using the git command line, one of the things that I often end up checking it which git branch I am on and if there are any pending changes. How awesome would it be if the bash shell prompt, told you the branch name if the directory is part of a git repository and if there are any changes. Well, thankfully someone has done this work already and with a little bit of configuration on your part, you can implement the changes.

Read More ›

Git Command Notes

github/ git

I am finally making myself learn the git command line instead of just using a UI so that I can actually understand what git is really doing. Plus I have started playing a lot with the IonicBox and running a Ubuntu vagrant controlled VM for this blog and both of those are just linux shell command prompt only machines. Below are my notes on various commands so that I can stop having to Google each time I forgot one of them.

Read More ›