Running a JSON API with Rack and mruby on a Raspberry Pi
I recently got a Raspberry Pi 2 so I wanted to experiment with home automation, surveillance system, movement detection and stuff like that.
I recently got a Raspberry Pi 2 so I wanted to experiment with home automation, surveillance system, movement detection and stuff like that.
You don’t need a database table to get Rails-style validations. With ActiveModel you can validate plain Ruby objects (a contact form, a search form, an API p...
A few ways to generate prime numbers in Elixir, from a naive check to a recursive sieve, a lazy infinite stream, and a parallel version with Task.async_strea...
Using a vendor library may require to load a shared library. Here’s how to do it in RubyMotion.
As you may know since a couple of month you can write native Android apps using RubyMotion.
You’ll sometimes have to use the notion of infinity in your Ruby code. There isn’t any way to directly use infinity in Ruby, at least none that I know of… Bu...
Having a clear and well-defined default stack when you start a new project is a good thing — it will have an impact on your productivity and happiness. I’ll ...
Thor is a simple and efficient tool for building self-documenting command line utilities. I’m a shell guy, I use a terminal everyday and most of my job is do...
Sometimes it can be very useful to add verbose and silent modes to your app. This way users can easily control information level about events happening. As y...
Why returning plain data instead of models made some of my Rails code simpler, faster and easier to test.
I moved to Doom Emacs and disabled Evil out of habit. Later I gave its Vim bindings a real chance. The grammar fought me for a while, then it clicked, and it...
In this article, I engage in a conversation with ChatGPT to explore the possibility of extraterrestrial life and the pressing need to preserve our planet. We...
In this article, I engage in a conversation with ChatGPT to explore the possibility of extraterrestrial life and the pressing need to preserve our planet. We...
When it comes to Emacs and emails reading, one of the most popular options is Gnus. Let’s see how to configure it for multiple IMAP / SMTP servers without us...
When writing Elixir code you’ll often find yourself typing the pipe operator which is not very convinient. Let’s see how to ease this in Emacs.
You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.
On Friday I was having slowdowns on Textmate focus. I never had this problem before and this “bug” was only happening on this given project. I had to wait fo...
Years ago I added Elasticsearch to a Rails app and search got faster. I credited the search engine. Looking back, I’m not sure that was the lesson. Here is h...
Elixir is dynamically typed, but ‘typing in Elixir’ now spans three things: the runtime shape you get from pattern matching and structs, optional typespecs c...
Phoenix LiveView handles real-time interactivity on the server, so you can build interactive pages without writing a frontend framework. Here’s a small task ...
A few ways to generate prime numbers in Elixir, from a naive check to a recursive sieve, a lazy infinite stream, and a parallel version with Task.async_strea...
You don’t always need Phoenix. For a small API, Plug alone gives you full control over requests and responses with almost no machinery. Here’s a JSON endpoin...
When writing Elixir code you’ll often find yourself typing the pipe operator which is not very convinient. Let’s see how to ease this in Emacs.
Elixir and Erlang comes with so much tooling that most of the time you’ll be able to do what you need to without having to depend on any external software.
You’ve probably heard that in Elixir you should let processes crash rather than trying to catch every possible exceptions. Then, after a crash, you only have...
Sometimes when you’re writing a Phoenix app you want to split your translation files to avoid having one big file with everything inside but rather having on...
The GNU Emacs NS port doesn’t handle mailto: links on macOS: click one while Emacs is running and nothing happens. emacs-mailto is a tiny relay app that fixe...
shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...
GPG only protects the emails you actually remember to protect. Instead of toggling signing and encryption by hand before every send, mu4e can do it for me: s...
I moved to Doom Emacs and disabled Evil out of habit. Later I gave its Vim bindings a real chance. The grammar fought me for a while, then it clicked, and it...
When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...
When it comes to Emacs and emails reading, one of the most popular options is Gnus. Let’s see how to configure it for multiple IMAP / SMTP servers without us...
When writing Elixir code you’ll often find yourself typing the pipe operator which is not very convinient. Let’s see how to ease this in Emacs.
You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.
I moved to Doom Emacs and disabled Evil out of habit. Later I gave its Vim bindings a real chance. The grammar fought me for a while, then it clicked, and it...
Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...
GPG only protects the emails you actually remember to protect. Instead of toggling signing and encryption by hand before every send, mu4e can do it for me: s...
Last week a workmate did me a pull request where he wanted to merge a fully new “develop” branch into “master”. The thing was that he realized that he has to...
When it comes to Emacs and emails reading, one of the most popular options is Gnus. Let’s see how to configure it for multiple IMAP / SMTP servers without us...
Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...
Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...
Hanami 2 arrived in three acts: the app rewrite in 2.0, views in 2.1, and a full ROM-based database layer in 2.2. With that last piece, it’s a complete full-...
Last week I wrote about settings up Sikekiq in Hanami. Another gem I often use is I18n since it allows to localize strings and keep them separated from my co...
One of the gems I often use in my Ruby on Rails projects is Sikekiq. For those of you who don’t know about it, it allows to easily manage background processes.
Sometimes when you’re writing a Phoenix app you want to split your translation files to avoid having one big file with everything inside but rather having on...
Following the mass and using de-facto libraries isn’t always the best choice. Here are some thoughts about handling translation of data stored in database wh...
Last week I wrote about settings up Sikekiq in Hanami. Another gem I often use is I18n since it allows to localize strings and keep them separated from my co...
In this article, I engage in a conversation with ChatGPT to explore the possibility of extraterrestrial life and the pressing need to preserve our planet. We...
I18nFloat is a Ruby gem to use with Rails. I18nFloat allows your users to use format number like “1 200,84” in forms. ActiveRecord Float attributes don’t car...
Googlus is a Ruby wrapper around Google URL Shortener REST API.
Phoenix LiveView handles real-time interactivity on the server, so you can build interactive pages without writing a frontend framework. Here’s a small task ...
Sometimes it can be very useful to add verbose and silent modes to your app. This way users can easily control information level about events happening. As y...
A lot of people struggles to find how to instruct their Mac OS GUI apps to be aware of their PATH environment variable. Sometimes when you install GUI apps t...
Couple weeks ago I switched from RVM to rbenv because I think it’s a cleaner and faster way to handle Ruby versions. It is more respecful of the Unix philoso...
Elixir and Erlang comes with so much tooling that most of the time you’ll be able to do what you need to without having to depend on any external software.
The GNU Emacs NS port doesn’t handle mailto: links on macOS: click one while Emacs is running and nothing happens. emacs-mailto is a tiny relay app that fixe...
shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...
I18nFloat is a Ruby gem to use with Rails. I18nFloat allows your users to use format number like “1 200,84” in forms. ActiveRecord Float attributes don’t car...
Googlus is a Ruby wrapper around Google URL Shortener REST API.
Years ago I added Elasticsearch to a Rails app and search got faster. I credited the search engine. Looking back, I’m not sure that was the lesson. Here is h...
Phoenix LiveView handles real-time interactivity on the server, so you can build interactive pages without writing a frontend framework. Here’s a small task ...
Sometimes when you’re writing a Phoenix app you want to split your translation files to avoid having one big file with everything inside but rather having on...
You don’t always need Phoenix. For a small API, Plug alone gives you full control over requests and responses with almost no machinery. Here’s a JSON endpoin...
Years ago I added Elasticsearch to a Rails app and search got faster. I credited the search engine. Looking back, I’m not sure that was the lesson. Here is h...
Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...
Why returning plain data instead of models made some of my Rails code simpler, faster and easier to test.
Years ago I added Elasticsearch to a Rails app and search got faster. I credited the search engine. Looking back, I’m not sure that was the lesson. Here is h...
Rails 8 isn’t really a bag of new methods. Its headline is a stance: drop Redis, drop the PaaS, and run a real app from a single box you own — with the datab...
Service objects keep business logic out of fat controllers and models. A handful of conventions (one entry point, a consistent return value, a simple constru...
You don’t need a database table to get Rails-style validations. With ActiveModel you can validate plain Ruby objects (a contact form, a search form, an API p...
Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...
Rails 7.1 isn’t a headline release. It’s a pile of quality-of-life additions that quietly remove boilerplate you write all the time — normalizing attributes,...
Knowing how to use the Rails console can be very useful when debugging or trying your snippets. Being proficient with it will increase your productivity.
Following the mass and using de-facto libraries isn’t always the best choice. Here are some thoughts about handling translation of data stored in database wh...
I18nFloat is a Ruby gem to use with Rails. I18nFloat allows your users to use format number like “1 200,84” in forms. ActiveRecord Float attributes don’t car...
Googlus is a Ruby wrapper around Google URL Shortener REST API.
Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...
Why returning plain data instead of models made some of my Rails code simpler, faster and easier to test.
Years ago I added Elasticsearch to a Rails app and search got faster. I credited the search engine. Looking back, I’m not sure that was the lesson. Here is h...
Rails 8 isn’t really a bag of new methods. Its headline is a stance: drop Redis, drop the PaaS, and run a real app from a single box you own — with the datab...
A short tour of five dry-rb gems I keep coming back to: validation, types, structs, configuration, and composable business logic. Small, focused libraries th...
Service objects keep business logic out of fat controllers and models. A handful of conventions (one entry point, a consistent return value, a simple constru...
You don’t need a database table to get Rails-style validations. With ActiveModel you can validate plain Ruby objects (a contact form, a search form, an API p...
Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...
Hanami 2 arrived in three acts: the app rewrite in 2.0, views in 2.1, and a full ROM-based database layer in 2.2. With that last piece, it’s a complete full-...
Rails 7.1 isn’t a headline release. It’s a pile of quality-of-life additions that quietly remove boilerplate you write all the time — normalizing attributes,...
Sometimes you’ll have to create a deeply nested hash without knowing how deep it can be at first. This hash should allow reading and setting values at any le...
Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...
Sometimes after upgrading RubyMotion I face some bugs introduced in the new release. It can be bugs which can easily be worked around or really annoying bugs...
Using a vendor library may require to load a shared library. Here’s how to do it in RubyMotion.
As you may know since a couple of month you can write native Android apps using RubyMotion.
You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.
GPG only protects the emails you actually remember to protect. Instead of toggling signing and encryption by hand before every send, mu4e can do it for me: s...
When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...
Why returning plain data instead of models made some of my Rails code simpler, faster and easier to test.
shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...
A few ways to generate prime numbers in Elixir, from a naive check to a recursive sieve, a lazy infinite stream, and a parallel version with Task.async_strea...
Let’s see how SourceHut helped me to automate my blog updates.
Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...
When Rails 4 was released it offered a bunch new features and deprecations :
As you may notice I’m a big fan of Mercurial which is a great DSCM a lot more easier to learn and use than Git in my opinion.
Chef is a Ruby Gem which aims to help sys admins in the process of managing servers.
Couple weeks ago I switched from RVM to rbenv because I think it’s a cleaner and faster way to handle Ruby versions. It is more respecful of the Unix philoso...
Let’s see how SourceHut helped me to automate my blog updates.
Sometimes you’ll have to create a deeply nested hash without knowing how deep it can be at first. This hash should allow reading and setting values at any le...
A lot of people struggles to find how to instruct their Mac OS GUI apps to be aware of their PATH environment variable. Sometimes when you install GUI apps t...
Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...
You’ll sometimes have to use the notion of infinity in your Ruby code. There isn’t any way to directly use infinity in Ruby, at least none that I know of… Bu...
Ruby is a very dynamic language which allows you to do things like encapsulate a piece of code in an object. This is a really powerful capability you can use...
Sometimes it can be very useful to add verbose and silent modes to your app. This way users can easily control information level about events happening. As y...
Elixir is dynamically typed, but ‘typing in Elixir’ now spans three things: the runtime shape you get from pattern matching and structs, optional typespecs c...
I moved to Doom Emacs and disabled Evil out of habit. Later I gave its Vim bindings a real chance. The grammar fought me for a while, then it clicked, and it...
Couple months ago I was working on my personal website that I decided to re-write from scratch since most of the existing things had to be scratched off and ...
When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...
A short tour of five dry-rb gems I keep coming back to: validation, types, structs, configuration, and composable business logic. Small, focused libraries th...
The GNU Emacs NS port doesn’t handle mailto: links on macOS: click one while Emacs is running and nothing happens. emacs-mailto is a tiny relay app that fixe...
The GNU Emacs NS port doesn’t handle mailto: links on macOS: click one while Emacs is running and nothing happens. emacs-mailto is a tiny relay app that fixe...
GPG only protects the emails you actually remember to protect. Instead of toggling signing and encryption by hand before every send, mu4e can do it for me: s...
shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...