There are many, many command line converters for turning Markdown into HTML, but for the most part these make HTML fragments, not full documents with CSS styling. That’s fine most of the time (e.g. when I’m writing blog posts), but sometimes I want a full, pretty document so I can print it out (typically for presentation notes).
To fill this hole I put together a small script that converts Markdown and wraps the HTML result in a template that includes Bootstrap CSS. I set the fonts to
monospace so that they are taken from the defaults for your browser, making it easier to use your favorite fonts.
The script requires the Python libraries Python Markdown, mdx_smartypants (a Python-Markdown extension), and Jinja2.
“Yield and overcome” – Lao Tsu, Tao Te Ching
Over the past year or so I have on a few occasions taught git to people
accustomed to using Subversion. These are experienced software developers so it
seems like it should be easy, but it is almost always a difficult process
filled with acrimony, resistance, and gasps. (And this from people who seem
to use Emacs, vim, and Linux without complaint.)
And yet when I teach git to people who don’t already have a preferred
version control system it seems to go pretty well. It takes time, and there
may be confusion, but we demo and practice and learn as with any topic.
There is no hate. I think I’m beginning to understand the situation:
- Git and svn are different.
- People do not like their workflow changed.
Git isn’t just a little different, it’s completely different. But, dear
svn users, git is not different because it doesn’t like you. Git is different
because it’s optimized to facilitate the collaboration of a number of
developers working on a rapidly changing code base. Some examples:
- Branching is easy in git so that you can work in peace isolated from
upstream changes until you are ready to send your work back.
- When it’s time to merge back git provides
rebase to facilitate cleanly
integrating upstream changes.
- Git is distributed so that you and everyone else can make all manner of
branches and experiments without dirtying up the master repo.
Git is different from svn, but it does well what it is designed to do.
This brings me back to the Lao Tsu quote from the top and a simple message
to svn users learning git: You will have to drop your svn workflow to make
the most of git, but it’s not because git is bad, it’s just different. Yield,
use git in the way it was meant to be used, and be happy.
Normally when I do a push in git I do something like
git push origin master, which really means push from the local branch named
master to the remote branch named
master. If you want to push to a remote branch with a different name than your local branch, separate the local and remote names with a colon:
git push origin local-name:remote-name