Probably not so much, or at least less than you might think.
We often need to store dates and times in a database and retrieve them later. I have seen people choosing to store those in the highest precision available. For example, in Python the precision for a datetime
object is microseconds. That is one millionth of a second!
For a lot of use cases, this kind of precision is not needed. For many
cases, second precision is enough. Examples for use-cases that probably don’t need the highest precision are:
DATETIME(3)
type where the number denotes the sub-second precision. Defining the precision explicitly makes it not only more predictable in your code, it also avoid wasting space.
As usual, it depends on the use case. It does make sense to think a little bit about the precision to avoid problems later in the development process.
I was looking for an easy way to create new jekyll posts via command line and found the plugin Jekyll compose. I am very late to the party but wanted to give this a little bit more visibility as I have used a more bare-bones Jekyll beforehand.
Installation is simple via:
gem 'jekyll-compose', group: [:jekyll-plugins]
bundle
bundle exec jekyll post "My new post"
To show the full URL in Chrome, right click on the address bar and check “Always show full URLs”. This shows the http(s) portion of the URL in all cases and not only the domain name.
I just released the first version v0.1.0 of hermes on my Github account. Hermes is named after the Greek god - the messenger of Mount Olympus. With hermes you can analyze you iMessage display statistics of your iMessage database on the command line and extract conversations. The supported formats at this time are JSON, plain text and YAML. An example looks like this:
$ hermes statistics
Total messages: 100000
Received messages: 40000
Sent messages: 60000
Daily Average: 45.66
Monthly Average: <Not available>
Yearly Average: <Not available>
Chats: 30
go install github.com/f-ewald/hermes@latest
. This will get you the most up to date version.hermes
or ./hermes
, depending on your installation location.
hermes
directly and follow the instructions from the help. At the moment, there are two main commands available: statistics
and conversations
.
% ./hermes
Hermes is a command-line interface for iMessage databases.
You can use it to analyze and display retrieveConversations and view statistics.
Usage:
hermes [command]
Available Commands:
check Validate the environment
completion Generate the autocompletion script for the specified shell
conversation Show retrieveConversations, find participants
help Help about any command
statistics Display message statistics
Flags:
--config string config file (default is $HOME/.hermes.yaml)
-d, --database string Full path to the chat database if it is different than the default path.
-h, --help help for hermes
-o, --output string The output format. Can be either json, yaml or text (default "text")
Use "hermes [command] --help" for more information about a command.
statistics
command.
To display conversations, use the conversations list
command. This returns a list of all conversations sorted by internal id together with the participants. If this is a one-to-one conversation, there will be only one participant. Group conversations have multiple participants.
To show the conversation, use the conversation get <id>
command. Replace <id>
with the unique conversation identifier that can be obtained from the list command. The conversation will contain the participants and all messages ordered by date. Each message is prefixed with the unique participant identifier.