<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on (ノ°Д°）ノ︵ ┻━┻</title>
    <link>https://erick.navarro.io/posts/</link>
    <description>Recent content in Posts on (ノ°Д°）ノ︵ ┻━┻</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 03 Feb 2025 17:27:15 -0600</lastBuildDate>
    <atom:link href="https://erick.navarro.io/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Telegram bot to preview social media content</title>
      <link>https://erick.navarro.io/posts/telegram-bot-to-preview-social-media-content/</link>
      <pubDate>Mon, 03 Feb 2025 17:27:15 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/telegram-bot-to-preview-social-media-content/</guid>
      <description>I usually share some links of Twitter(it is known as X now but I still call it Twitter) in Telegram, but for some reason the previews doesn&amp;#39;t work well most of the times.&#xA;One solution was to edit a Twitter link so I can use vxtwitter.com instead of twitter.com, this provides better previews but doing it that way is too manual so I made a bot to detect when I share a Twitter link and edit the message to use vxtwitter.</description>
    </item>
    <item>
      <title>Add D2 support to Hugo</title>
      <link>https://erick.navarro.io/posts/add-d2-support-to-hugo/</link>
      <pubDate>Thu, 13 Jun 2024 06:49:06 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/add-d2-support-to-hugo/</guid>
      <description>D2 is declarative language to generate diagrams, it&amp;#39;s like mermaid on steroids, it has a cli so it&amp;#39;s easy to use.&#xA;Hugo doesn&amp;#39;t support it at the moment of writing this, there is an open issue where the conversation is being done.&#xA;So in the meantime official support is added we&amp;#39;re going to make our own integration. It will have 2 parts:&#xA;A little HTTP server that receives the d2 code and return a resulting SVG A custom hugo code block render hook A simple HTTP server in go This server only uses standard library and do the follow:</description>
    </item>
    <item>
      <title>Mermaid preview using xwidget browser</title>
      <link>https://erick.navarro.io/posts/mermaid-preview-using-xwidget-browser/</link>
      <pubDate>Wed, 05 Jun 2024 08:19:05 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/mermaid-preview-using-xwidget-browser/</guid>
      <description>Mermaid.js is a great tool to make diagrams in plain text, I use it a lot and I wanted to have a way to see previews of the code I was writing. There are some options to do that but they require to have a mermaid-cli installed, which requires nodejs as well.&#xA;Emacs has a built-in webkit browser, in case it was compiled with --with-xwidgets flag, and mermaid run on js so it should be possible to just run the code I want in the browser and see it there.</description>
    </item>
    <item>
      <title>Moving to Emacs Tree Sitter Modes</title>
      <link>https://erick.navarro.io/posts/moving-to-emacs-tree-sitter-modes/</link>
      <pubDate>Tue, 21 May 2024 22:30:15 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/moving-to-emacs-tree-sitter-modes/</guid>
      <description>I&amp;#39;m currently using emacs 30 and this version has support for more languages using the new ts-modes, I&amp;#39;ve been using emacs-tree-sitter package since Emacs added dynamic modules feature.&#xA;Now using emacs 30 I give a try to use only ts-modes and maybe delete some external packages I was using.&#xA;How to install grammars Emacs doesn&amp;#39;t have a built-in way to install automatically most common grammar so we&amp;#39;re going to use a package that can handle that, we use tree-sitter-langs package, which is a repository for grammars.</description>
    </item>
    <item>
      <title>Simple OBS Client in Elixir</title>
      <link>https://erick.navarro.io/posts/simple-obs-client-in-elixir/</link>
      <pubDate>Sun, 12 May 2024 13:49:50 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/simple-obs-client-in-elixir/</guid>
      <description>Let&amp;#39;s write a simple module to control OBS using websockets.&#xA;OBS already have a websocket server which can accept many command to control its features. We&amp;#39;re going to use that websocket server to make some actions like:&#xA;Change scene Apply source filters Many other things Basic configuration First we need to install a websocket client, fresh is a easy to use client that works on top on mint.&#xA;Let&amp;#39;s add the following code to our mix.</description>
    </item>
    <item>
      <title>Code search Alfred workflow</title>
      <link>https://erick.navarro.io/posts/code-search-alfred-workflow/</link>
      <pubDate>Thu, 21 Sep 2023 08:58:16 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/code-search-alfred-workflow/</guid>
      <description>Code search is a useful tool to search for examples about some function, class, etc. We&amp;#39;re going to create a Alfred workflow to easily search into GitHub Code search and SourceGraph&#xA;Create a workflow Let&amp;#39;s go to Alfred settings/Workflows/+/Blank workflow&#xA;Name our new workflow, you can use whatever name you want, let&amp;#39;s put &amp;#34;Code search&amp;#34;&#xA;Create a new element of type script filter&#xA;Now we need to make some adjustments over the defaults values:</description>
    </item>
    <item>
      <title>Switching from helm to vertico and friends</title>
      <link>https://erick.navarro.io/posts/switching-from-helm-to-vertico-and-friends/</link>
      <pubDate>Thu, 31 Aug 2023 23:23:06 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/switching-from-helm-to-vertico-and-friends/</guid>
      <description>I&amp;#39;ve been using helm for many years, since I started to use emacs itself. It was great because it is a &amp;#34;all in one&amp;#34; tool, very convenient when starting in emacs world.&#xA;The problem(?) Actually there is a not problem perse, just maybe the &amp;#34;startup time&amp;#34;, I had the load deferred so the first time I call some function from helm there was a little &amp;#34;wait&amp;#34;, nothing really bad but a little annoying</description>
    </item>
    <item>
      <title>Select term at point using tree sitter in emacs</title>
      <link>https://erick.navarro.io/posts/select-term-at-point-using-tree-sitter-in-emacs/</link>
      <pubDate>Sun, 06 Nov 2022 01:26:36 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/select-term-at-point-using-tree-sitter-in-emacs/</guid>
      <description>Some days ago I saw a tweet(detail below) that show an interesting feature, a way to select terms using the mouse. After seeing that I thought it will be easy to implement using tree-sitter.&#xA;doubleclick to select term, the way nature intended pic.twitter.com/O123K12AHp&#xA;&amp;mdash; andrew blinn (@disconcision) October 31, 2022 To be able to implement this we just need tree-sitter.el which will allow us to select terms using grammars.</description>
    </item>
    <item>
      <title>Run ispell on text nodes using tree sitter</title>
      <link>https://erick.navarro.io/posts/run-ispell-on-text-nodes-using-tree-sitter/</link>
      <pubDate>Sun, 26 Jun 2022 14:28:34 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/run-ispell-on-text-nodes-using-tree-sitter/</guid>
      <description>tree-sitter is a great tool to have an incremental syntax tree of our code, in emacs it can be used to add syntax highlighting instead of using the regular regex based highlighting system. There are other use cases for this and now we&amp;#39;re going to use it to build a simple tool to run ispell using the content of a text node, of course we can select the text manually but it will be easier and fancy to do it in a programmatic way using the syntax tree generated by tree-sitter.</description>
    </item>
    <item>
      <title>Memes fuzzy finder using Alfred, fzf and jq</title>
      <link>https://erick.navarro.io/posts/memes-fuzzy-finder-using-alfred-fzf-and-jq/</link>
      <pubDate>Sat, 18 Jun 2022 22:10:56 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/memes-fuzzy-finder-using-alfred-fzf-and-jq/</guid>
      <description>Let&amp;#39;s create a Alfred workflow to search for memes in a folder(our collection) and put that image in the clipboard so we can user it wherever we need it. Yes, it sounds useless but it was fun to made.&#xA;First we need to cover some things to understand how an Alfred workflow works. There are many types of elements to build a workflow, this time we&amp;#39;re going to use 2 specific elements:</description>
    </item>
    <item>
      <title>Auto build and publish emacs org configuration as a website</title>
      <link>https://erick.navarro.io/posts/auto-build-and-publish-emacs-org-configuration-as-a-website/</link>
      <pubDate>Sun, 04 Apr 2021 10:32:08 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/auto-build-and-publish-emacs-org-configuration-as-a-website/</guid>
      <description>Having our emacs configuration in an org file is great, it allow us to have it more organized and easy to read, but org files have more features and one of them is the ability to be exported to different formats like HTML, PDF, markdown and so on. So what if we export our emacs configuration to HTML and then publish it in a website? 🤯&#xA;It probably doesn&amp;#39;t have any real utility but it would be nice to have a exclusive web page to show our emacs config to our friends :)</description>
    </item>
    <item>
      <title>Easy deploy of docker based projects</title>
      <link>https://erick.navarro.io/posts/easy-deploy-of-docker-based-projects/</link>
      <pubDate>Fri, 02 Apr 2021 21:57:24 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/easy-deploy-of-docker-based-projects/</guid>
      <description>I have a personal server where I run some projects, some of them written in python, elixir and other technologies so having to deal with specific installation of any of these technologies is not an ideal workflow, to fix this I use docker and all of them are deployed using docker-compose, they&amp;#39;re connected to a single PostgreSQL server and they&amp;#39;re behind the same web server.&#xA;Running all of these projects in this way it&amp;#39;s easier to maintain and in case something happens with the server I can re deploy everything in a easy way.</description>
    </item>
    <item>
      <title>Using compilation mode to run all the things</title>
      <link>https://erick.navarro.io/posts/using-compilation-mode-to-run-all-the-things/</link>
      <pubDate>Thu, 01 Apr 2021 10:44:22 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/using-compilation-mode-to-run-all-the-things/</guid>
      <description>Compilation mode is a major mode that allow us to run a command and see its output result in a special buffer, this resulting buffer show the errors and allow us to navigate through them, you can check the documentation for more details.&#xA;It&amp;#39;s a &amp;#34;simple mode&amp;#34; but it can be used for many things like compile and run a program, run tests, and so on.&#xA;Usage Interactive compile is an interactive function so we can call it with M-x compile and enter the command we want to execute.</description>
    </item>
    <item>
      <title>Things I wish I knew when I started in elixir development</title>
      <link>https://erick.navarro.io/posts/things-i-wish-i-knew-when-i-started-in-elixir-development/</link>
      <pubDate>Mon, 01 Mar 2021 08:54:15 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/things-i-wish-i-knew-when-i-started-in-elixir-development/</guid>
      <description>These are some things I commonly use in my elixir development workflow that might be interesting for someone.&#xA;Managing multiple versions of elixir and erlang When you have to work in more than one project at time that could probably means you have to handle different elixir and erlang versions so installing the default version that your OS provides won&amp;#39;t be helpful. Here is where asdf shines to solves this problem, asdf allow us to have different versions of elixir, erlang and other languages in the same machine so we can easily switch between them.</description>
    </item>
    <item>
      <title>Activate python virtualenv automatically with direnv</title>
      <link>https://erick.navarro.io/posts/activate-python-virtualenv-automatically-with-direnv/</link>
      <pubDate>Sun, 28 Feb 2021 23:06:47 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/activate-python-virtualenv-automatically-with-direnv/</guid>
      <description>direnv is a tool to set up automatically environment variables as soon as we enter in a directory that contains a .envrc file. We can use this feature to activate our virtualenvs as well.&#xA;Let&amp;#39;s see what happens when we activate manually a virtualenv with source ./env/bin/activate:&#xA;A new new environment variable called VIRTUAL_ENV is exported. The path is updated to include the bin directory inside our virtualenv this is made to allow us to point to the correct python installation and run cli interfaces exposed by the dependencies we have installed.</description>
    </item>
    <item>
      <title>Find file under cursor in emacs</title>
      <link>https://erick.navarro.io/posts/find-file-under-cursor-in-emacs/</link>
      <pubDate>Sat, 27 Feb 2021 11:08:20 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/find-file-under-cursor-in-emacs/</guid>
      <description>#TIL you can use gf to open a file under the current cursor position in VIM, I was reading this post I found in Hacker News and I was wondering if evil-mode has this functionality as well&#xA;evil-mode has this key binding defined and it uses (find-file-at-point), it works well for absolute paths but not for relative paths and I wanted to use it for a path like this templates/home.</description>
    </item>
    <item>
      <title>Meme generator in emacs</title>
      <link>https://erick.navarro.io/posts/meme-generator-in-emacs/</link>
      <pubDate>Sat, 03 Oct 2020 22:27:26 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/meme-generator-in-emacs/</guid>
      <description>#TIL it is possible to create memes in emacs using meme, this package allow to choose an image and add some text to it, we can also select any image and use it.&#xA;Installation This package, at the time of writing this, is not available on melpa so we have to install it manually or using straight.el or quelpa, because I&amp;#39;m using straight.el for my config we&amp;#39;ll use that.</description>
    </item>
    <item>
      <title>Getting started with Tsung</title>
      <link>https://erick.navarro.io/posts/getting-started-with-tsung/</link>
      <pubDate>Sat, 03 Oct 2020 09:01:38 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/getting-started-with-tsung/</guid>
      <description>What is tsung Tsung is a load testing tool written in erlang, it allow us to perform load testing for web applications, databases, etc. Or as its website says:&#xA;Tsung (formerly IDX-Tsunami) is a distributed load testing tool. It is protocol-independent and can currently be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL, AMQP, MQTT, LDAP and Jabber/XMPP servers.&#xA;More info is available in its web page http://tsung.erlang-projects.org/user_manual/&#xA;In this post we&amp;#39;ll cover how to test a web application and at the time of writing this the available version of tsung is 1.</description>
    </item>
    <item>
      <title>Things to keep in mind when contributing to a software project</title>
      <link>https://erick.navarro.io/posts/things-to-keep-in-mind-when-contributing-to-a-software-project/</link>
      <pubDate>Tue, 21 Jul 2020 12:58:17 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/things-to-keep-in-mind-when-contributing-to-a-software-project/</guid>
      <description>These are some are thoughts to keep in mind when we&amp;#39;re contributing to a software project.&#xA;Know your tools Git is maybe the most extended tool to manage version control in software and as a daily tool we should invest some time in knowing how to use it &amp;#34;properly&amp;#34;.&#xA;Configure your name and email properly This helps to identify who make a change while we&amp;#39;re browsing git log history. Don&amp;#39;t use initials or nicknames, in a few months or maybe years eventually you will be looking at the git log and if you see something like this Author: XYZ &amp;lt;xyz@some-random-provider.</description>
    </item>
    <item>
      <title>Creating helper commands for k8s using fzf</title>
      <link>https://erick.navarro.io/posts/creating-helper-commands-for-k8s-using-fzf/</link>
      <pubDate>Sun, 17 May 2020 00:13:20 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/creating-helper-commands-for-k8s-using-fzf/</guid>
      <description>Kubernetes cli tool kubectl is pretty useful but when I need to execute some tasks many times during a work day it could be too verbose. So I wrote some bash functions to handle a few common tasks I use often.&#xA;I used the power of fzf to create an interactive experience when I run any of these functions. Basically it pipes the output of a kubectl command, make some filtering using sed and awk and then build a final command which will execute what I want.</description>
    </item>
    <item>
      <title>Avoid losing window layout when editing org code blocks</title>
      <link>https://erick.navarro.io/posts/avoid-losing-windows-layout-when-editing-org-code-blocks/</link>
      <pubDate>Sat, 16 May 2020 15:39:10 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/avoid-losing-windows-layout-when-editing-org-code-blocks/</guid>
      <description>Org-mode has a nice feature that allow us to edit source code within an org file, for more info check the docs. But it has a little annoying behavior after we are done editing a source block. It loses the previous window configuration and always closes all the windows except the org window.&#xA;In the image below we can see this behavior:&#xA;To solve this problem we can use a simple variable to store the current window configuration just before the source code edition buffer is opened and when it&amp;#39;s closed we can restore the previous configuration just getting the value from the variable used before.</description>
    </item>
    <item>
      <title>Testing an API with emacs and restclient</title>
      <link>https://erick.navarro.io/posts/testing-an-api-with-emacs-and-restclient/</link>
      <pubDate>Sun, 27 Oct 2019 16:53:00 -0600</pubDate>
      <guid>https://erick.navarro.io/posts/testing-an-api-with-emacs-and-restclient/</guid>
      <description>When we&amp;#39;re developing some application we frequently interact with APIs.&#xA;There are applications like postman, httpie, insomnia and so on to accomplish this task but having an external application only to test a few endpoints or even a complex API is a little overkill.&#xA;Using emacs and a great package called restclient.el we can have a very complete tool to handle API requests without leaving our favorite editor.&#xA;Installation Put these lines of code in your emacs configuration and you&amp;#39;ll be ready to go.</description>
    </item>
    <item>
      <title>Minimal Setup for Elixir development in Emacs</title>
      <link>https://erick.navarro.io/posts/minimal-setup-for-elixir-development-in-emacs/</link>
      <pubDate>Sat, 19 Oct 2019 10:00:15 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/minimal-setup-for-elixir-development-in-emacs/</guid>
      <description>I&amp;#39;ve been working professionally with Elixir for 7 months, obviously using emacs as my daily editor. In this post we&amp;#39;ll see some packages that could be useful for Elixir development.&#xA;I&amp;#39;m not using LSP (yet), so the goal here is just to have a minimal setup for Elixir development.&#xA;We&amp;#39;re going to use use-package to install all the needed packages.&#xA;Syntax highlighting We&amp;#39;ll use Elixir-mode. This package give us syntax highlighting support and some useful features like mix-format which let us format our code using mix format task, which is available since Elixir 1.</description>
    </item>
    <item>
      <title>Creating an emacs formatter the easy way</title>
      <link>https://erick.navarro.io/posts/creating-an-emacs-formatter-the-easy-way/</link>
      <pubDate>Mon, 20 May 2019 19:44:35 -0700</pubDate>
      <guid>https://erick.navarro.io/posts/creating-an-emacs-formatter-the-easy-way/</guid>
      <description>Some weeks ago I discovered a really nice package for emacs called reformatter.el. This package allows to define reformat functions in a easy way.&#xA;Most languages have a reformat tool. Elixir has mix format, Elm has elm format, python has black and so on. These formatters are convenient because they give uniformity to the code, but this is a topic for another post.&#xA;Having these formatters integrated within our favorite editor is great.</description>
    </item>
    <item>
      <title>Save and Restore Window Configuration in Emacs</title>
      <link>https://erick.navarro.io/posts/save-and-restore-window-configuration-in-emacs/</link>
      <pubDate>Tue, 25 Dec 2018 10:18:56 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/save-and-restore-window-configuration-in-emacs/</guid>
      <description>When we are using emacs sometimes we often open many buffers in different windows at the same time, for example we can have a buffer for a opened file, another for seeing test results and so on.&#xA;There are some tools to manage &amp;#34;sessions&amp;#34; but I wanted something simple and I also wanted to learn a little bit more of elisp so here is the result.&#xA;(defvar window-snapshots &amp;#39;()) (defun save-window-snapshot () &amp;#34;Save the current window configuration into `window-snapshots` alist.</description>
    </item>
    <item>
      <title>Setting Up Hugo on Netlify</title>
      <link>https://erick.navarro.io/posts/setting-up-hugo-on-netlify/</link>
      <pubDate>Mon, 24 Sep 2018 10:45:05 -0500</pubDate>
      <guid>https://erick.navarro.io/posts/setting-up-hugo-on-netlify/</guid>
      <description>Hugo is a static site generator that just like another alternatives(Nicola, Jekyll, etc) allows to write in plain text and generate html, js, css files. Hugo is so much simpler to use because it&amp;#39;s a simple binary file that allows to develop and prepare the site to be published.</description>
    </item>
  </channel>
</rss>
