Using relative line numbers is a great way to make navigation in vim
more
efficient, however, it can be a pain while pairing or when you need absolute
line numbers. One way of making this process easier is to create a key
binding which toggles relative line numbers. It can be done by adding the
following function to your vimrc
.
Elixir Deployments: Solving Build-time vs Run-time env problem with Akd
I have been deploying/running production applications for about two years now
and the first problem that comes to mind while deploying OTP
releases is
Build-time vs Run-time environment configuration. While running a Mix
project
there isn’t much of a difference between build-time and run-time as you are
running the app in the same environment in which you’re compiling (building) it.
However, that might not be the case when using releases. At Annkissam, we have
come up with a few solutions to that problem which I explain better in
this
post.
Docker: Run TCP Services locally
Most of the dynamic web applications depend on databases like mysql
,
postgres
, mongodb
etc. However, setting up an environment (or a server) to
work with those services can be a pain. And if you add periodic upgrades,
version management and OS-specific package manager issues, it could really be
a nightmare!
Elixir: Open Files with Vim using IEx.Helpers.open/1
One of the less known (but useful) features of Elixir’s IEx module is the
open/1
function. Open works with either a given Module
,
Module.function/arity
or {file, line_number}
. Once configured, it allows the
developers to open a file with a given file path and line number. This is
incredibly useful while debugging inside a IEx.pry
session as it allows you
to jump to the place where a particular function is defined.
Mix: Using Xref to Enforce better Design
Elixir is one of my favorite languages! Dealing in functions, pipes, Process-Oriented
programming, OTP and a great community make working in Elixir a great experience.
However, there isn’t a better workflow/means to limit access control across
modules (for example: protected
in ruby
). Because of this deficiency, I often
find myself working in a project where apps try to make calls to modules that
they shouldn’t.