Category: Technical

  • Setting (database) credentials on a Spring Boot project, the right way

    Setting (database) credentials on a Spring Boot project, the right way

    Searching online for how to set up the credentials to access the database (or any other service) while in development leads to a lot of articles that propose something that works, but it’s wrong: putting your credentials in the application.properties file that you then commit to the repository. The source code repository should not have…

  • Jumping into the deep end

  • My take on an AJAX re-frame effect handler

    My take on an AJAX re-frame effect handler

    There’s already an AJAX re-frame effect handler provided by Day8, the same guy who made re-frame and there’s nothing wrong with it. From the documentation, this is how you use it: That felt a little to verbose for my taste, so I made my own that you use like this: If you are familiar with…

  • Pre-signed S3 URLs with Clojure and ClojureScript

    Pre-signed S3 URLs with Clojure and ClojureScript

    Dashman uses S3 for storing the encrypted screenshots. They can go directly from the renderer application to S3 and from there to the displayer application as there’s no need for the server application to ever see them. They are end-to-end encrypted anyway. My needs in this regard were a bit unique. I have a server…

  • How to work with a private library in ClojureScript

    How to work with a private library in ClojureScript

    Dashman is composed of many components  including three desktop apps written in ClojureScript using Electron that share code through a private library (as in, it’s not open source). To have continuous integration and a set up that is easy to boostrap, that library should be deployed to a private repository. I achieved that using the…

  • ClojureScript debouncer

    ClojureScript debouncer

    I’m developing Dashman in ClojureScript (and Clojure) and as I was developing the cookie handler I found sites that constantly modify the cookies. As in, many times per second. Obviously I don’t want to encrypt the cookies and send them to the server that often, but even without taking that into account, just storing them to…

  • The Highlander query with Rails’ ActiveRecord

    The Highlander query with Rails’ ActiveRecord

    For those cases in which there can be one and only one record on the database with certain fields and I don’t just want to get the first one and silently get the wrong one. I want to make sure there’s one and only one, so, I wrote this little extension to ActiveRecord that does…

  • Emacs is hurting Clojure 

    Emacs is hurting Clojure 

    Emacs is a very powerful text editor and its popularity amongst Clojurians is easily understood. Emacs has a long tradition in the Lisp communities as it’s written, in a big part, in a flavor of Lisp called Emacs Lisp. Because of its history, it handles Lisp code wonderfully, with automatic correct indentation, paraedit, integration with…

  • Avoiding threads of emails when developing a Rails application

    Call to Buzz, like many applications I developed before, sends emails. Lot’s of emails. To avoid accidentally emailing a customer or random person I use mail_safe. It’s one of the first gems I install on a Rails project and you should too. mail_safe re-writes the to-header so you end up receiving all the emails that…

  • Displaying Delayed::Job’s jobs in Active Admin

    I’ve been using both Active Admin and Delayed::Job for years now and both have served me very well. It’s very common for me to want to display job records in the admin tool and have some extra tools around them such as: the ability to mark them all for re-run the ability to run one…