Some Macs running Linux hang when waking up from sleep if the Ethernet port was connected. Fix this problem by automatically disabling/reenabling the drivers when the machine goes to sleep.
My blogging has seen multiple iterations over the years, and with it, the tools I use have changed. At the moment I use a set of free tools and workflows which make it very easy to keep my blog updated. This post gives a brief overview of my setup.
Automate the process of generating and inserting links to headlines in the current Org document using human-readable IDs instead of the default UUID-based IDs generated by Org mode.
I switched from my hand-crafted Emacs config to Doom Emacs some time ago, and I am very happy with it. This is my full, working Doom Emacs config in literate form.
I am happy to announce a new release of my new book “Learning Hammerspoon”, including a brand new chapter Hammerspoon Cookbook, Tips and Tricks and many other improvements.
As I’m taking notes or writing in Org-mode, I often want to insert screenshots inline with the text. While Org supports inserting and displaying inline images, the assumption is that the image is already somewhere in the file system and we just want to link to it. In this post I will show you how to automate the insertion of images from the clipboard into an org-mode document.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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):
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. Just download the script, open it in Script Editor and run it. Tip of the hat to Justin for his excellent collection of scripts at Veritrope!
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:
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. Those are the options that are offered to you by Evernote. Just change them to whatever you want, and they will be available for selection. What I specifically wanted to do was to use the YYYY-MM-DD format, so I changed it to the following:
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
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.
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:
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.
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.