Skip to content

Instantly share code, notes, and snippets.

Hexagonal Architecture

From https://www.golinuxcloud.com/hexagonal-architectural-golang/

Hexagonal Architecture Components

  1. Core Business Logic: This is the central component of the architecture, and it contains the application's core domain logic. This component should be independent of any external systems and should not be affected by changes in the infrastructure or the user interface.
  2. Adapters: These are the components that connect the core business logic to the external systems. They can be thought of as the "ports" through which the application communicates with the outside world. Adapters can take many forms, including APIs, databases, user interfaces, and messaging systems.
# From extracted imaginary_base to imaginary, the working image
FROM imaginary_base
ARG PORT=9000
RUN ls -l /usr/local/lib /usr/local/bin/imaginary /usr/local/bin/vips*
# Install libvips required libraries (again) + cjk fonts
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
@suntong
suntong / 69-language-selector-zh-cn-ZZ.conf
Last active October 27, 2023 12:10
Ubuntu 中文字体设置/美化
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test qual="any" name="family">
<string>serif</string>
@suntong
suntong / “孩子每发烧一次,就会变聪明一些”,真的是这样吗?.md
Created October 10, 2023 18:23
老人常说:“孩子每发烧一次,就会变聪明一些”,真的是这样吗?

老人常说:“孩子每发烧一次,就会变聪明一些”,真的是这样吗?

https://www.sohu.com/a/490707795_120889535

感觉孩子发烧一次,就能解锁一些“新技能”‍ 最近,小田家的宝宝因为换季又感冒发烧了,小田细心地照顾,经过一段时间后,孩子的烧终于退了。但经过这次发烧后,小田发现孩子学会了说话。

小田真的是又惊又喜,经过长时间的观察后,小田发现,孩子每次发烧后,都会解锁一项新的技能,像突然会数数、突然能说多个字的句子、甚至还学会了音调……

于是,小田觉得,孩子每发烧一次,可能就会变得更聪明。

openapi: 3.0.0
servers:
- description: Main endpoint.
url: https://app.asana.com/api/1.0
info:
contact:
name: Asana Support
url: https://asana.com/support
description: This is the interface for interacting with the [Asana
Platform](https://developers.asana.com). Our API reference is generated from
This file has been truncated, but you can view the full file.
openapi: 3.0.1
info:
version: 4.159.0
title: Linode API
description: >
## Introduction
The Linode API provides the ability to programmatically manage the full
openapi: 3.0.3
servers:
- url: https://api.spotify.com/v1
info:
contact:
name: sonallux
url: https://github.com/sonallux/spotify-web-api
description: >
You can use Spotify's Web API to discover music and podcasts, manage your
Spotify library, control audio playback, and much more. Browse our available
openapi: 3.0.0
info:
title: Petstore-OpenAPI
version: v0.1
summary: ""
description: >-
This is a sample Pet Store Server based on the OpenAPI 3.0
specification. You can find out more about
Swagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
query{
__type(name:"Repository") {
fields {
name
description
type {
kind
name
description
}
@suntong
suntong / c
Last active July 24, 2023 21:24
c