The first thing I discovered is that when you go to install iTerm2’s shell integration it checks to see what shell you are using by reading the variable $SHELL, which is your accounts default shell, not necessarily the shell you are running.
Since my corporate Active Directory account sets my default shell to
/bin/ksh (don’t ask, just don’t ask) this caused me a problem. In iTerm my default profile is set to run the command
/bin/bash rather than my default shell. So to get shell integration installing properly I now set
SHELL='/bin/bash' at the bottom of my bash profile.
So I’m now using Ulysses for writing. Not coding, for that I’m still with BBEdit, but writing text of any sort. It seems quite an attractive editor, it supports MarkDown and things seem to work well.
I’m writing this as a test of it as a blogging platform. Of course the first thing to do is see what text looks like when I export it to WordPress from within Ulysses. Here, for example is some emphasised texrt and here is some strong test Let’s try a list
- We have the first item in an unordered list
- Now we have the second
That was the whole list.
- An ordered list
- So can you pick up items and reorder them
- We will see
If you delete or reorder it doesn’t update the numbers in your document but it is correct on export.
So how about we throw in
I don't like Ulysses needs a marker at the beginning of every code line.
I found this in my email archives. I hope you can enjoy it as much as I do.
One of my friends (he was one of my most pleasant customers at Sydney Uni) many years ago wrote me an email asking me a tech question. It was February 2008 and we were both upset by the New England Patriot’s loss in Super Bowl LXII that ruined a perfect season.
I recently decided to set myself up with a Unix box in the cloud. I want it so I can use it for things I can’t do on my iPad, most notably using
pandoc for converting MarkDown documents to various other formats.
There are any number of places that offer an incredibly cheap box. I found a special offer at one and bought myself a year for less than $20. I then fired up an Ubuntu 16 server.
Here’s what I did to get it all working in a (fairly) secure manner.
My daughter, Jessica was born the Thursday before Father’s Day in 1992, the 3rd of September. That means this year her birthday occurs on Father’s Day.
That begs the question, what other years will this occur? Here’s some Python code that answers the question.
# Find all the years when my daughter's
# birthday and Father's day coincide
# from the year of her birth till 2100
for i in range(1992, 2100):
dt = "3 09 " + str(i)
tt = time.strptime(dt, "%d %m %Y")
if tt.tm_wday == 6:
I love you, Jessica. My favourite Father’s Day gift ever, always.
I have spent my spare time in the past two weeks writing a web app. I couldn’t find a good web site that offered an easy personal journal. I wanted something that was a bit like a blog but with less fuss and totally private.
So I decided to try writing one. The language choice was obvious, Python. The next question was which framework to use. I did a web search and discovered that the choice quickly came down to two.
Django is the older giant in the room compared to Flask. The two also have a different philosophies. Django has it all built-in while Flask seems to be a thin wrapper over Werkzeug and Jinja2 mostly providing request and session handling while leaving almost everything else to extensions. Continue reading
This is more in the way of a note to myself. I was just starting to write a bash completion script for Pandoc when I came upon this in the Pandoc documentation:
Generate a bash completion script. To enable bash completion with pandoc, add this to your
eval "$(pandoc --bash-completion)"
So no need for me to write one. Neat trick, generate your own bash completion script. John McFarlane really is a god. Oh, and the completion is top quality, it knows when you’ve typed an option that takes an input or output format and completes on those and other little tricks. I may end up using some of his tricks for my completions.