Skip to content

Instantly share code, notes, and snippets.

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

James Mills prologic

👋
Staff Engineer / SRE, Founder of Yarn.social and Salty.im
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active March 23, 2026 03:33
Learn Go in ~5mins
@prologic
prologic / docker-volume-plugins.md
Last active March 23, 2026 03:33
Docker Volume Plugins
@prologic
prologic / WSC.md
Last active March 23, 2026 03:33
Web Security Checklist (draft)

Web Security Checklist (draft)

Instructions

Please fork this gist and use as your own checklist as you develop/deploy your web application or api.

WARNING: This checklist makes an assumption of the level of expertise and experience of the reader and assumes significant in-depth knowledge and experience in web development.

App

@prologic
prologic / SelfHosted.md
Last active November 1, 2025 14:38
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 / PortMapping.md
Last active April 26, 2025 22:51
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 \; }
@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 November 3, 2024 19:59
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 / 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);