Originally, rsync would start over and over again when using it without VFAT-specific options. Luckily, I learned about those quickly. To synchronize my music, only, I invoke as follows.
Make Slate/Middleman recompile CSS faster
Slate is a great code documentation setup based on Middleman. I’ve been playing with it a bit and like it a lot since it’s based on Padrino and very easily extended. However, I had this problem that every page reload would take roughly five seconds. It turned out the problem is the CSS compilation happening… Continue reading Make Slate/Middleman recompile CSS faster
Dear Ruby (2): The Functional Inherited Hook
A valuable debate arose from my last post about extending inherited. Matz suggested using an anonymous class generated by a method from which the actual class inherits. This is a common pattern found in many gems, even my own. As a reminder, the behavior I want is as follows. Note that the whole point of… Continue reading Dear Ruby (2): The Functional Inherited Hook
Dear Ruby (1): What about Arguments when Inheriting?
With most of my code becoming more and more stateless and functional, I haven’t given up leveraging Ruby’s excellent way of defining declarative APIs and DSL. Ruby is just too good at that. However, I am missing a crucial tool in Ruby: being able to pass dynamic arguments to the inheritance, exactly the way I… Continue reading Dear Ruby (1): What about Arguments when Inheriting?
Solved: omniauth-github fails to authenticate
I was playing with the omniauth-github gem in a Trailblazer/Sinatra application with the basic setup as described per README. When hitting /auth/github manually, something happened, but then I’d get an exception on my side saying the following. ERROR — omniauth: (github) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected E, [2017-12-10T19:09:08.951604 #9111] ERROR — omniauth: (github)… Continue reading Solved: omniauth-github fails to authenticate
Audacious doesn’t toggle play/pause with Apple’s play key.
Audacious in Ubuntu doesn’t have the “Global Hotkeys” plugin activated per default. If you enable it, the play/pause key on Apple keyboards (probably on others, too) will start the song, but then restart it when tapped again. The solution is to set the XF86AudioPlay button to “Pause/Resume”.
Hard-drive Backups to USB drives using Encryption, on Ubuntu
Data backups are important. USB sticks with 256GB or more have become affordable, and are a good way for backups. I wanted mine to be encrypted. Since I usually dump my entire home directory to the backup medium (my new USB drive), indiscreet, or, let’s call it sensitive data like passwords and SSH keys will… Continue reading Hard-drive Backups to USB drives using Encryption, on Ubuntu
Formatting an SD Card to VFAT on Linux
Brand-new SD cards sometimes need to be formatted to VFAT to work properly on Linux. sudo fdisk /dev/mmcblk0 > t select “b” for FAT32 > w This will convert the first partition to FAT32 and write the new partition table to the SD card. Make sure to select the top-level disk with fdisk, and not one… Continue reading Formatting an SD Card to VFAT on Linux
Schemaless Models With Hash Fields or JSONB
For quite a bit I’ve been playing with the idea of “schemaless” models, intrigued by the idea of dumping entire hashes into database fields instead of having to add every little setting as a real database column. Where the latter involves the tiresome process of migrations, hash fields in databases can simply be extended ad-hoc.… Continue reading Schemaless Models With Hash Fields or JSONB
Cells 4.1: Block Support, Better Collections, External Layouts!
After many weeks of work, I am happy to announce the 4.1 release of Cells, the popular view model gem for Ruby. In this release we are paving the way for the upcoming, super fast Cells 5.0 by tidying up the core, and adding some amazing new features. This all happened without any public API… Continue reading Cells 4.1: Block Support, Better Collections, External Layouts!