rust Writing Rust NIF code to convert encryption code from Elixir to Rust In this article, we will go through what a NIF is, how to write safe NIF code using Rust and Rustler
elixir Add latency tracking to phoenix live view apps. Add latency tracking to phoenix live view apps
rust Running scheduled cron jobs in Rust using tokio Running periodic/scheduled tasks in Rust using tokio and async/await
rust Making periodic http requests in Rust Making http requests in Rust using reqwest, tokio, async/await and http proxies and cookies
nix Configure max_connections for PostgreSQL using nix How to configure max_connections value for PostgreSQL using nix
elixir using elixir master branch using nix and nix-shell There were some noteable changes that landed on the master branch in elixir today, related to improving the compilation, and I wanted to try out the latest version of elixir that was on the master branch. Since I use nix for setting up my projects, the latest version of elixir
elixir Using variables inside binary pattern matching I was refactoring a piece of code that I inherited in a codebase, which was parsing date from an external source in various formats into Date in elixir. The initial version of parse/1 function look something like the following: defmodule DateParser do def parse( <<_day_value::binary-size(1), space_or_comma::binary-size(1), _rest::binary>> = purchase_date ) when space_or_
elixir Tracing in Elixir/Erlang using :erlang.trace and GenServer Recently, I wanted to trace a running Elixir system and see the messages that a function received. I was looking to inspect the params that it received and even manipulate the params to fiddle with some edge cases in the system. I knew that I could use dbg to start
postgresql Deleting stale Postgres wal files I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files was still being retained in the wal folder. Checking a
postgresql Finding long running SQL queries in PostgreSQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower per day, and I had to figure out what was happening to the system. One of the things that I checked immediately was whether
nix Using custom/older versions of libraries and packages using nix. Install custom or older versions of package(Ruby or Node or any other) using nix by overriding the package derivation using overrideAttrs
nix nix-shell for elixir projects Simple nix-shell to get started with using nix as development environment with Elixir/Phoenix/Rust
elixir Tracing in Elixir/Erlang using dbg trips and tricks. Tips and tricks for tracing in elixir/erlang using dbg module and some helper functions.
ruby Custom types using dry-logic and predicates Build custom types for IPv4 and IPv6 using dry-logic and predicates.
ghost Upgrading ghost to 3.X from 2.x Upgrading Ghost from v2.x to v3.x and fixing compatibility of ghost-cli with nodejs versions.
rails Escaping special characters like & in rails Html views Safely escape and render html characters while preserving special characters like ampersand(&) using strip_tags and Loofah
rails Letter opener is not processing emails in rails app letter_opener [https://github.com/ryanb/letter_opener] is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for
rspec Fixing Rspec tests involving timestamps on CircleCI. Use TimeCop gem or rspec be_within built in matcher to fix specs involving timestamps in CircleCI
AWS Tuning concurrency settings for AWS S3 CLI Tuning the max_concurrent_requests configuration for better performance when copying files from S3 buckets using the AWS CLI S3.
internet explorer Using X-UA-Compatible to render websites in compatibility mode. Add X-UA-Compatible meta tags or headers to force Internet Explorer to run websites in compatibility mode. the same can be done by forcing http headers on web servers
node Fix for 100% CPU usage by node.js If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuild using fsevents.
docker Making dependent services wait till containers are healthy using docker health check Using the health check option provided by docker we can make containers wait till the dependent containers are online and healthy
elixir How to make a Genstage consumer subscribe only to particular events or stream Genstage consumer can optionally subscribe to some of the events produced by the producer by using GenStage.BroadcastDispatcher as dispatcher and by specifying a :selector function which filters out the events we are interested in
linux Extending the disk space on an EC2 instance How to extend disk space on an AWS EC2 instance or Elastic BeanStalk instance by extending the Elastic Block Store volume and resizing the partition
blog Upgrade ghost from v0.11 to v1.0+ and tweak Casper theme layout to use list instead of cards How to update ghost from version v0.11 to v1.0 and up and tweaking the default casper theme for lists instead of cards, adding syntax highlighting, and bigger fonts