For the past few years I’ve maintained a simple work-log, ~/Work.md
, containing notes, references, and documentation on what I’ve done each day. This was briefly documented on my blog.
This habit has served me well, but now I’m using org-mode
, which is part of emacs.
There are many tutorials and guides relating to org-mode
, as well as a dedicated website containing reference material. In terms of this file there are only a few things to note:
- It is written in
org-mode
syntax, which is similar to markdown.- Headers are prefixed with a
*
rather than a#
. - Inline-code is quoted with === rather than
`
. - Everything is a tree, and you can toggle them open/closed via
TAB
&Shift-TAB
- Headers are prefixed with a
- Because this is used within Emacs you can of course customize it with your own Lisp code.
- This document contains a couple of blocks of Emacs Lisp to do different things.
- Code is inline, rather than in my emacs .dotfiles, so this file is self-contained.
**TLDR**: Every day I add a new entry, via M-x new-day
. The new entry contains a consistent set of subheadings, and upon export any sections for a given day which are which are empty are removed.
The lisp contained at the foot of this document must be evaluated to gain access to the ability to add new entries, and jump to today’s entry.
My own emacs init files handle this here:
There are two things to note:
- A block named
skx-startblock
is evaluated once when this file is loaded, if it is present.- This makes
M-x new-day
, andM-x today
available, for example.
- This makes
- A block named
skx-saveblock
is evaluated every time this document is saved.- This updates our tag-cloud.
This is just a random section to show that you can add your own global contents, as well as the daily-log entries.
Things I achieved in 2019 were good.
Things I achieved in 2020, went viral.
None.
None.
None.
None.
Today is a random day, I resolved the following tickets:
- SRE-123
- SRE-124
I tested some work - note in the HTML-export of this file you can collapse the following example:
$ docker run -t -i hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Today I published this file, in a dedicated repository:
None.
None.
- 09:00-09:15 - Daily Sync
None.
None.
This section of our document is used when this document is exported to HTML - changing the display, and adding extra functionality.
Here we change the way our output document is rendered when exported to HTML:
- We add a fair bit of spacing between daily-entries.
- New top-level headers use
H2
tags.
- New top-level headers use
- We indent different sub-sections.
- We setup a margin of
50px;
for each child.
- We setup a margin of
- We insert commas between the tags in our tag-lists.
<<css-export>>
The following snippet of javascript is included in our export, and does several things:
- Moves the scroll-position to today’s entry, if it can be found.
- Updates each of our headings to prefix the date with the day of the week.
- Having the weekdays is more pleasant when viewing, but entering them at the time is annoying.
- Makes all source/example/code blocks collapsible.
<<js-export>>