New release of "Learning Hammerspoon" is out!
April 8, 2019
I am happy to announce a new release of my new book "Learning Hammerspoon", including a brand new chapter and many other improvements.
First release of "Learning Hammerspoon"
October 16, 2018
I am happy to announce the first release of my new book "Learning Hammerspoon", a book devoted to using Hammerspoon to make using your Mac easier, faster and more fun.
My Hammerspoon Configuration, With Commentary
January 8, 2018
In my ongoing series of literate config files, I present to you my Hammerspoon configuration file.
My Emacs Configuration, With Commentary
December 17, 2017
I have enjoyed slowly converting my configuration files to literate programming style using org-mode in Emacs. It's now the turn of my Emacs configuration file.
My Elvish Configuration With Commentary
November 16, 2017
In this blog post I will walk you through my current Elvish configuration file, with running commentary about the different sections.
Just Enough Lua to Be Productive in Hammerspoon, Part 2
November 1, 2017
In this second article of the "Just Enough Lua" series, we dive into Lua's types and data structures.
Just Enough Lua to Be Productive in Hammerspoon, Part 1
October 21, 2017
Hammerspoon's configuration files are written in Lua, so a basic knowledge of the language is very useful to be an effective user of Hammerspoon. In this two-part article I will show you the basics of Lua so you can read and write Hammerspoon configuration. Along the way you will discover that Lua is a surprisingly powerful language.
Using Nix's "Single-user Mode" on macOS
September 20, 2017
Here is how to set up Nix in single-user mode on macOS.
Fixing the Outlook-to-OmniFocus Script
September 11, 2017
Here’s how to fix the breakage caused by one of the recent updates to Microsoft Outlook in the Outlook-to-OmniFocus AppleScript included with my SendToOmniFocus spoon.
Using Spoons in Hammerspoon
September 1, 2017
In this second article about Hammerspoon, we look into _Spoons_, modules written in Lua which can be easily installed and loaded into Hammerspoon to provide ready-to-use functionality. Spoons provide a predefined API to configure and use them. They are also a good way to share your own work with other users.
Hosting a Ghost Blog in GitHub - the easier way
August 25, 2017
When I was planning the reboot of my website, I seriously considered using Ghost. It has a very nice UI, beautiful and usable theme out of the box, and a very active community. Eventually I decided to use Hugo, but in the process discovered that it is possible to host a statically-generated Ghost website using GitHub Pages.
Getting Started With Hammerspoon
August 21, 2017
This is the first installment of a series of posts about Hammerspoon, a staggeringly powerful automation utility which gives you an amazing degree of control over your Mac, allowing you to automate and control almost anything. In the word of Hammerspoon's motto: _Making the runtime, funtime_.
Fast translation with Google Translator
March 7, 2016
via https://medium.com/@mrdoro/fast-translation-with-google-translator-and-mac-osx-817e32233b7a https://medium.com/@mrdoro/fast-translation-with-google-translator-and-mac-osx-817e32233b7a Nice article about how to create a service to automatically translate selected text from any application. I use this all the time, I have a “German-to-English” service bound to Command-Alt-Ctrl-Shift-E, so I can just select text off the screen, press the shortcut, and a window with the translation will pop up. Very handy.
Spotlight: use-package, a declarative configuration tool - Mastering Emacs
February 25, 2016
via https://www.masteringemacs.org/article/spotlight-use-package-a-declarative-configuration-tool Have you ever heard of use-package? It’s a declarative way of expressing package configuration in Emacs but without the tears. This looks amazingly useful. I need to start migrating my Emacs config to use-package ASAP.
Moving files between git repositories, preserving history
April 17, 2015
I needed to copy a directory between two git repositories while preserving its history. I found some good instructions at http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/, which got me started, but I figured out a way to avoid having to move all the files into their directory again (lines 5-6 in Greg’s instructions) by reversing the filter to remove everything I don’t want instead of only including the directory I want. Here are the steps (the idea is the same as in Greg’s post, so please read that to get the explanation, I’m only listing the commands here for reference):
Find all single-note tags in Evernote
January 14, 2015
I’ve been working on cleaning up my Evernote, and noticed that I have a lot of tags assigned to a single note. I had successfully used Veritrope’s excellent Evernote empty tag remover applescript, so I made some small changes to write the attached script, which will find all single-note tags in your Evernote and list them in a new note, including links to each note. This makes it much easier to go through them and see which of those tags could be removed.
How to solve truncated docker output in Mac OS X using boot2docker
May 12, 2014
If you are using docker on Mac OS X using boot2docker (http://docs.docker.io/installation/mac/), you may see truncated output from docker run, and also may have noticed that docker attach does not work properly, producing only some output and then exiting. This bug is documented here: https://github.com/boot2docker/boot2docker/issues/150, where I also found the following workaround. Documenting it here in case anyone finds it useful: Instead of using the default value of DOCKER_HOST provided by boot2docker up, establish the docker connection through an ssh tunnel:
HowTo: Changing the available display formats for Evernote's "Insert Date" command
November 13, 2012
Evernote introduced some time ago an "Insert Date" keyboard shortcut, which is very handy. However, the options for the format of the inserted date seemed limited (only four options). I finally learned how this works, and how to change it on the Mac. The formats offered are those that are configured in the "Languages & Text" preferences panel. If you go to "Region" and then click the "Customize button" in the Dates part of the panel, you will see and be able to customize the formats for short, medium, long and full date representations.
Installing cfengine on Mac OS X
August 5, 2011
Cfengine (tested 3.2.0) installs easily on OS X (tested 10.7), given that it's Unix. One problem I encountered was that it does not compile with the bundled version of Berkeley DB (it recognizes it during configure, but produces compilation errors). The solution is to use some other DB engine. I chose Tokyo Cabinet. Using homebrew, the process is simple brew install tokyo-cabinet After this, configure --with-tokyocabinet, and then compile and install as usual.
Automatically creating tasks from email in Outlook
March 16, 2011
Please note: I am no longer using Windows nor Outlook, so unfortunately I cannot offer any help with problems you encounter using these scripts and techniques. Over the last few days I have been redoing my GTD-under-Outlook setup, based on the instructions available in the "GTD and Outlook" guide from DavidCo (I will write more about my setup later). One of the tricks the guide suggest is creating a mail rule on outgoing mail, which scans the message body for a special tag (/wf or *wf* are suggested) and automatically adds the message to the @WAITING FOR email folder.
Making cygwin, Windows and emacs understand the same symlinks
September 28, 2010
Today I ran into the problem that symlinks created under cygwin using "ln -s" are not understood by Windows, and of course Windows shortcuts are seen by cygwin as regular files. Happily, this is a (semi-)solved problem. For reference, this is what needs to be done: Add "winsymlinks" to your CYGWIN environment variable. For example, in my .bashrc I have the following: export CYGWIN="nodosfilewarning winsymlinks" This makes cygwin create symlinks differently, in a form that is understood both by it and by Windows.
Storing CFEngine configuration in CVS
September 7, 2010
via sial.org Useful article about storing both development and production configurations of cfengine using a version control mechanism. I am in the process of developing a similar setup using git, I will share it here when I get it to work properly.
Installing cfengine on Windows 7 under cygwin
August 23, 2010
Update (2011/09/05): Updated the instructions for cfengine 3.2.0, cygwin 1.7.9, and tested them on a clean cygwin install. Installing the cfengine community edition under Windows (the commercial version includes native Windows support) is fairly easy under cygwin, you just need to have the appropriate dependencies installed. Here’s how I did it. Versions cfengine: 3.2.0 Windows 7 Enterprise SP1/64bit cygwin: 1.7.9-1 Additional cygwin packages needed To install these, run cygwin’s setup.