Using Caps Lock as Menu/Apps keys on Emacs

I’m an ergoemacs-mode user, a mode that changes most key bindings so that they put less strain on your hands.  For example, it uses Alt instead of Ctrl most of the time, which is easier to press: use your curled thumb instead of a karate chop.  Also, many commands are activated by first pressing the Menu/Apps key (that key near the Right Ctrl which usually opens the context menu).  For example, pressing Menu then T allows you to switch buffers.

However, the keyboard on my new notebook doesn’t have a dedicated Menu key.  Instead, one needs to press Fn+Right Ctrl, which is of course extremely painful.

Menu key hidden on the Right Ctrl.


I’ve found a workaround, though.  A very hackish workaround.

Continue reading “Using Caps Lock as Menu/Apps keys on Emacs”

Abstracting permissions with Yesod

Yesod is a terrific framework for web applications in Haskell.  It has many, many built-in features.  One of them is that there’s nice support for authentication and authorization.  In this post I’m interested in talking about how you could write your authorization code such that it’s harder to make mistakes.

Continue reading “Abstracting permissions with Yesod”