Skip to content

Instantly share code, notes, and snippets.

View danidiaz's full-sized avatar

Daniel Díaz Carrete danidiaz

View GitHub Profile
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
{-# LANGUAGE GHC2024 #-}
{-# OPTIONS_GHC -Wincomplete-patterns #-}
module Main where
import Data.Kind
import GHC.Exts
import Data.Void
-- Unlifted types
{-# LANGUAGE UnliftedDatatypes #-}
{-# LANGUAGE GHC2024 #-}
{-# OPTIONS_GHC -Wincomplete-patterns #-}
module Main where
import Data.Kind
import GHC.Exts
import Data.Void

Vertical decomposition. Creating cohesive services

One of the biggest misconceptions about services is that a service is an independent deployable unit, i.e., service equals process. With this view, we are defining services according to how components are physically deployed. In our example, since it’s clear that the backend admin runs in its own process/container, we consider it to be a service.

But this definition of a service is wrong. Rather you need to define your services in terms of business capabilities. The deployment aspect of the system doesn’t have to be correlated to how the system has been divided into logical services. For example, a single service might run in different components/processes, and a single component might contain parts of multiple services. Once you start thinking of services in terms of business capabilities rather than deployment units, a whole world of options open.

What are the Admin UI

@danidiaz
danidiaz / _FP reading lists.md
Last active January 15, 2026 20:31
assorted reading lists

A series of reading lists mostly related to functional programming.

@danidiaz
danidiaz / flake.nix
Created April 1, 2025 19:40
Basic example of Nix modules
{
description = "A very basic example of modules";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }: {
# nix eval .#.lib.boo.config
lib = {
@danidiaz
danidiaz / _configuration.nix
Last active March 29, 2025 22:16
Nixos configuration
# start flake-less configuration with WSL and git
#
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
@danidiaz
danidiaz / Capslock2Ctrl.ahk
Last active February 23, 2025 12:06
Emulating the "United States-International (AltGr Dead Keys)" keyboard layout on a plain US layout.
; https://autohotkey.com/docs/misc/Remap.htm
Capslock::Ctrl
@danidiaz
danidiaz / flake.nix
Last active September 1, 2024 08:27
Nix flake for AWS cli on Linux
{
description = "AWS cli devshell";
inputs = {
nixpkgs.url = "nixpkgs/24.05";
};
outputs = { self, nixpkgs }:
let system = "x86_64-linux";