Country codes to flag emoji in Elixir
I just read this blog post. It showed, in JavaScript, how to convert country code string to its respective flag emoji, and I wanted to see…
I just read this blog post. It showed, in JavaScript, how to convert country code string to its respective flag emoji, and I wanted to see…
Hey! just wanted to share that my dotfiles were featured on the Dotfiles publication on Substack by Adib Hanna https://dotfiles.substack.com…
Introduction Seeking a hands-on way to further explore Mermaid — a remarkable JavaScript diagramming and charting tool — I decided to apply…
Have you ever installed something using Homebrew and noticed the command's output updating seemingly unrelated packages? This recently…
When working with Elixir and Ecto, it is crucial to fully understand the option for (aka foreign keys) in migrations. This option dictates…
When using Lua inside of Neovim you may need to view the contents of Lua tables, which are a first class data structure in Lua world. Tables…
I recently learned about a delightful new(ish) feature in Elixir's GenServer that managed to slip under my radar. This feature is the…
I like automating commands that I run often, and one of my favorite command line tools to use when automating scripts involving selection is…
(Maybe Obvious) Preamble What is DNS? Wife: What's DNS? Me: It's that thing you use every day when you browse the web on your phone. Me…
In Rust when you pass a variable to a function it is technically "moved". That means the the caller looses ownership of the variable and can…
To remove duplicate lines in Vim you can pipe a selection from the current buffer into : Select all lines you want to dedup (linewise) and…
If you're using ProtonVPN with the Kill Switch feature on a Debian based operating system (such as Ubuntu/Pop_OS!), you may find yourself…
I recently scraped all my old Hashrocket TIL posts and re-posted them here on my blog. One of the reasons is that I wanted to have all that…
One of my favorite Vim mappings is gx. When hovering over a URL with the cursor in normal mode and using this mapping, Vim will open the URL…
TL; DR: add this function to your / to create a PR from a Jira ticket: If you use Jira at work, but prefer to live in the terminal whenever…
My guitar teacher introduced me to this performance by Group 15 (Tom Aalfs, Peter Bernstein and Jay Leonhart) of the song Eronel by…
What's with the name? Retrovertigo is a song by one of my favorite, and most eccentric bands out there, Mr. Bungle. This song was released…
Read about why I started a new blog, technologies used, and my publishing philosophy
When you are trying to debug something it is usually helpful to see the stacktrace of what called a function. If you're inside of a…
Ever wonder what your public IP looks like? When I do, I usually search duckduckgo.com for "what's my ip" and it is nice enough to tell me…
If you are on a Linux machine and trying to run you may get . That is because some Linux distros don't come with it bundled by default. On…
I have some git aliases in my dotfiles and sometimes I use an alias for too long that I actually forget what it does under the hood. I can…
Have you ever found yourself doing this: And then copying the pids one by one so you can pass them to ? There's a better way to return just…
TIL that you can display visual fold markers in Vim's gutter by setting the ! The number indicates how wide the gutter holding the fold…
If you write a function that has a expression variables like so: When the function is called you will see the console log message that…
I've written here before about how to pretty-print JSON in Vim but since then I have found an even easier method using . jq is an amazing…
When you need to write a temporary file to disk it is common to assume a particular path exists based on the operating system the app is…
The Phoenix Framework provides an easy mix task to automatically generate a self-signed SSL cert. This is useful if you want to test the app…
TIL I learned about a really useful, open source, image optimization app called ImageOptim. This app will help you batch resize image files…
Today I learned how to clean stopped containers in Docker. Starting in Docker 1.13 a new command has been introduced. (docs) No one likes…
Imagine the following file: sed.test If you want to delete a line matching a regular expression (e.g. ), you can use at the end of your…
The ping utility is super useful for debugging network issues on docker, but it's package name is not as intuitive as . To get it on your…
Linux has a network utility called which can be very useful when debugging networking issues inside a docker machine. If you type inside…
Browsers allow you to capture a event in a DOM element [1] [2]. This event fires before any clipboard data is inserted into the document…
So yea you don't need a friend to send you a CD-ROM anymore to install node modules. You can use the World Wide Web! Pretty exciting. On a…
Cleaning up after yourself is important, and not just in real life. Good Git Hygiene™ goes a long way. One of the methods I like to clean up…
When you type that long feature branch name or URL but then want to delete it you have a few options, but hopefully you don't hold your…
Vim provides command for ordering lines in an ascending order, but what if you want to sort the lines in a reverse order? Linux's to the…
When you write a bash/zsh script relying on pipes normally you will not be able to pipe through text from the stderr output with a normal…
If you need to use a different SSH key for a git command such as you can do so by setting the environment variable like so: This can…
The lsof utility on Linux is useful among other things for checking which process is listening on a specific port. If you need to kill all…
When you need to transfer a lot of files from one location to another it's sometimes useful to have some progress indication and maybe even…
You probably know about where is a number dictating how many elements you want to take from an Enumerable. Use it like this: But how can…
By default, Firefox does not support the VP9 WebM codec sites like YouTube use to deliver 4k quality video. If you visit a video that…
My ls command colors directories and files according to their type and permissions: ls with color But when the window is too small to fit…
Some people like wordwrapping in Vim. Personally I find it annoying for code because it can destroy the meaning of the code in the context…
PSQL offers a handy function for showing the definition of a view. That function does not seem to work on materialized views. To see the…
Sometimes your desktop gets cluttered with windows of different running applications which makes it difficult to concetrate on the task at…
The asdf version manager is an awesome tool for managing many different language runtime versions. I recently started using it for Node and…
Javascript provides the ability to create custom errors by modifying the prototype of a function to the Error protorype. This is how one…
To get the date for beginning of week for a date in moment you can use the and functions on moment objects. NOTE: Remember that the start…
If you have a list of strings and you want to query a column to get all the matching records, but you do not care about the casing, Postgres…
If you have hundreds of past JavaScript projects sitting in your workspace folder, you probably also have hundreds of folders nested inside…
Using a proxy can be a good way to debug http issues. Unfourtunately setting the proxy on macOS globally does not apply to all command line…
If you use Distillery to produce Elixir releases for production you may be in a situation where your application is deployed and running but…
Recently I've been playing around with ripgrep (rg) which is a tool similar to Ack and Ag, but faster than both (and written in Rust FWIW…
You can pipe text into vim directly from stdin. This can be helpful if you want to edit the output of a long bash command, or if you want to…
Dates can be notoriously hard, particularly when it comes to timezones. If you select a date without timezone information and cast it to a…
Whenever I forget the syntax for a certain SQL command in Posgres I usually reach for Dash or simply search DuckDuckGo for the the specific…
By default vim treats two words connected with an underscore e.g. as a vim word text-object. This is very useful because you can then use…
One of my favorite Vim plugins is vim-gitgutter - it shows gutter markings for changes in the current buffer when that file is tracked by…
Vim provides a simple text file encryption feature. To make use of it add the following to your .vimrc: This will set the encryption to the…
Postgres comes packed with extensions just waiting to be enabled! To see a list of those extensions: This will list the extension's…
Ever wonder what a command you are using is? Turns out linux has the answers for you! Simply type followed by the name of the command…
If you are writing a procedural bash script, you may want to stop execution if one of the steps errored out. You can write error handling…
Ag (aka The Silver Searcher) is an amazing piece of software. It allows you to define file types (like Ack) and comes prepackeged with some…
I know your browser console is full of messages because you are debugging something, and that creates a lot of noise. Now you are adding a…
If you have a scheduling component to your Rails application you may need to store the day of week and time of day in the database. One way…