Learn in public

Things on Elixir, Emacs and web development.

A template for my Phoenix application

Posted: September 14, 2020

The template starts with: LiveView, TailwindCSS and GitHub CI.

Set default branch name for git

Posted: September 10, 2020

GitHub will use main as the default branch for newly-created repositories if you don't update in Settings → Repositories.

Use TailwindCSS with Next.js

Posted: September 10, 2020

There are several examples in tailwindlabs/tailwindcss-setup-examples, you can find Next.js here. It's very easy with postcss-import.

Books for learning Elixir

Posted: September 09, 2020

Book list for learning Elixir. Most of them can be found on pragprog.com or learning.oreilly.com.

Try broadway with Amazon SQS

Posted: September 07, 2020

dashbitco/broadway is an Elixir package built with gen_stage for concurrent and multi-stage data ingestion and data processing.

Examples for AlpineJS

Posted: August 28, 2020

This is a post for weekly sharing in group. Alpine is a light-weight JavaScript framework, it is powerful with extended HTML attributes, which is called directives. In the demo, I build dropdown, tabs and modal with just tiny amount of code. It is more handy to use with CSS frameworks such as TailwindCSS.

Calling NodeJS in Phoenix app with gRPC

Posted: July 24, 2020

The post is a for weekly sharing in group. gRPC is a high performance RPC framework that works across different languages and platforms. By using it, I built an Elixir/Phoenix application that calling NodeJS to crawl book information when saving the book ISBN.

在 AWS China 安装 Elixir 开发环境

Posted: June 10, 2020

搭这个环境主要是想体验一下 VSCode Remote SSH,服务器在国内的话连通性会好一点。在 AWS 宁夏区的 EC2 上安装 Elixir 环境,发现又拍云的镜像不太好用,折腾了一番后,还是在服务器上安装了 trojanprivoxy 才顺利地搭好了开发环境。

Chrome DevTool Tips

Posted: May 22, 2020

The post is mostly clipped from https://medium.com/@tomsu, for weekly sharing in group.

Pundit

Posted: April 16, 2020

Pundit is a gem for authorization.

Use Elixir packages in CodeRunner 2

Posted: July 18, 2019

After install Elixir syntax according to Use Elixir in CodeRunner 2, it works great. But it needs additional work to use external packages such as gen_stage.

Writing blog with ox-hugo

Posted: February 14, 2019

In the past six months, I keep using Spacemacs to write code and it is very handful. So I wonder how to write articles in Emacs. After searching around, Hugo came into my eyes. Just following the tutorial, a blog is built in less than 5 minutes.

Install Elixir with asdf

Posted: January 15, 2019

Elixir 1.8.0 is released today, let’s try it with asdf.