Skip to content

Instantly share code, notes, and snippets.

View prologic's full-sized avatar
👋
Principal SRE, Founder of Yarn.social and Salty.im

James Mills prologic

👋
Principal SRE, Founder of Yarn.social and Salty.im
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active April 17, 2024 18:49
Learn Go in ~5mins
@prologic
prologic / weed.yml
Created May 25, 2021 03:07
SeaweedFS Docker Swarm Stack
---
version: "3.8"
services:
master:
image: chrislusf/seaweedfs:latest
command: master -mdir=/data
networks:
- weed
@prologic
prologic / build.sh
Last active February 6, 2024 03:27
iptables built as a static standalone binary
name=iptables
version=1.4.21
release=1
source=(ftp://ftp.netfilter.org/pub/iptables/$name-$version.tar.bz2)
PKG="$(pwd)/pkg"
if [ -d $PKG ]; then
mkdir -p $PKG
fi
@prologic
prologic / consul.yml
Created October 11, 2021 07:21
Consul Stack (Docker Swarm)
---
version: "3.8"
services:
seed:
image: consul:latest
environment:
- "CONSUL_LOCAL_CONFIG={\"disable_update_check\": true}"
- "CONSUL_BIND_INTERFACE=eth0"
entrypoint:
@prologic
prologic / SelfHosted.md
Last active November 4, 2023 13:25
Self-hosted Golang apps by James Mills / prologic

Self-Hosted Go (Golang) Web Apps

  • golinks - golinks is a web app that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub. (Demo) MIT Go
  • notes - notes is a self-hosted note taking web app that lets you keep track of your notes and search them in a easy and minimal way. (Demo) MIT Go
  • pastebin - pastebin is a simple pastebin service with convenient CLI. (Demo) MIT Go
  • shorturl - shorturl is a simple URL shortener with very tiny URL(s). (Demo) MIT Go
  • todo - todo is a simple todo manager. (Demo) MIT Go
  • [wiki](https://git.mills.io/prolog
@prologic
prologic / Twtxt-IRC-Logs-2023-04-14.txt
Created April 16, 2023 01:49
Twtxt IRC Logs 2023-04-14
[2023-04-14 21:04:08] <westbam0> Hello, small question. Can you read this feed with twtxt?? https://feeds.twtxt.net/@afpfr@amicale.net/twtxt.txt
[2023-04-14 21:05:44] <westbam0> with twtxt in command line, it shows me that
[2023-04-14 21:05:44] <westbam0> ➤ afp_fr (14 hours ago):
[2023-04-14 21:05:44] <westbam0> ****
[2023-04-14 21:19:14] <buckket> They are using a format the original client does not support to do multiline posts
[2023-04-14 21:46:24] <westbam0> buckket And not a way to put in place a treatment to make it compatible?
[2023-04-15 00:52:28] → lain` joined (uid504610@user/lain/x-9874679)
[2023-04-15 00:53:17] → jaix joined (~jaix@user/jaix)
[2023-04-15 01:05:00] → xuu joined (xuu@user/xuu)
[2023-04-15 02:13:11] ⇐ jaix quit (~jaix@user/jaix): Quit: Leaving
@prologic
prologic / test_rpc.dart
Created February 12, 2023 06:48
Test JSON-RPC over UNIX socket in Dart/Flutter
import 'dart:async';
import 'dart:io';
import 'package:json_rpc_2/json_rpc_2.dart';
import 'package:stream_channel/stream_channel.dart';
StreamChannel<String> unixSocketChannel(String path) {
final host = InternetAddress(path, type: InternetAddressType.unix);
final controller = StreamChannelController<String>(sync: true);
Socket.connect(host, 0).then((socket) {
socket.cast<String>().pipe(controller.local.sink);
@prologic
prologic / Dockerfile
Created September 16, 2022 03:00
Docker's behaviour with a relative ENTRYPOINT?
FROM busybox
ENTRYPOINT ["echo", "Hello", "World"]
@prologic
prologic / vaul1t.yml
Last active September 8, 2022 06:11
Vault Cluster on Docker Swarm with Integrated Storage (raft)
---
version: "3.8"
services:
vault:
# image: vault:latest
image: prologic/vault:dev-ui
hostname: "{{.Node.Hostname}}"
environment:
VAULT_ADDR: "http://127.0.0.1:8200"
@prologic
prologic / PortMapping.md
Last active September 7, 2022 02:50
NFTables Port Mapping Example
  1. Create a table named nat with the ip address family:
nft add table ip nat
  1. Add the prerouting and postrouting chains to the table:
nft -- add chain ip nat prerouting { type nat hook prerouting priority -100 \; }