repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
7b8f68e
parent
4483b9c
author
Eric Bower
date
2024-09-08 14:35:49 +0000 UTC
docs: copy
2 files changed,  +28, -8
M pubsub/cli.go
+8, -1
 1@@ -58,7 +58,14 @@ func fromChannel(channel string) (string, string) {
 2 	return sp[0], sp[1]
 3 }
 4 
 5-var helpStr = "Commands: [pub, sub, ls]\n"
 6+var helpStr = `Commands: [pub, sub, ls]
 7+
 8+The simplest authenticated pubsub system.  Send messages through
 9+user-defined channels.  Channels are private to the authenticated
10+ssh user.  The default pubsub model is multicast with bidirectional
11+blocking, meaning a publisher ("pub") will send its message to all
12+subscribers ("sub").  Further, both "pub" and "sub" will wait for
13+at least one event to be sent or received.`
14 
15 type CliHandler struct {
16 	DBPool      db.DB
M pubsub/html/marketing.page.tmpl
+20, -7
 1@@ -37,10 +37,10 @@
 2   <p>
 3     The simplest authenticated pubsub system.  Send messages through
 4     user-defined channels.  Channels are private to the authenticated
 5-    ssh user.  The default pubsub model is multicast, meaning a publisher
 6-    (<code>pub</code>) will send its message to all subscribers
 7-    (<code>sub</code>).  Further, the <code>pub</code> will wait for a
 8-    valid <code>sub</code> before exiting.
 9+    ssh user.  The default pubsub model is multicast with bidirectional
10+    blocking, meaning a publisher (<code>pub</code>) will send its message to all
11+    subscribers (<code>sub</code>).  Further, both <code>pub</code> and
12+    <code>sub</code> will wait for at least one event to be sent or received.
13   </p>
14   <div>
15     <pre>ssh {{.Site.Domain}} sub mykey</pre>
16@@ -48,14 +48,27 @@
17 # or
18 cat important.md | ssh {{.Site.Domain}} pub mykey</pre>
19   </div>
20+
21+  <div>
22+    <h2 class="text-xl">Simple desktop notifications</h2>
23+    <pre>ssh {{.Site.Domain}} sub notify | notify-send "Job done!"</pre>
24+    <pre>./longjob.sh; ssh {{.Site.Domain}} pub notify</pre>
25+  </div>
26+
27   <div>
28-    <p>Compose automated scripts using unix pipes:</p>
29-    <pre>ssh {{.Site.Domain}} sub "alpine:latest" | docker pull alpine:latest && docker up -d dev</pre>
30-    <pre>docker build -t alpine:latest . | ssh {{.Site.Domain}} pub "alpine:latest"</pre>
31+    <h2 class="text-xl">Simple CI/CD</h2>
32+    <pre>ssh {{.Site.Domain}} sub myimg | docker pull myimg && docker up -d dev</pre>
33+    <pre>docker build -t myimg .; docker push myimg; ssh {{.Site.Domain}} pub myimg</pre>
34   </div>
35+
36   <div class="text-center">
37     <a href="https://pico.sh/getting-started" class="btn-link my-2 inline-block">GET STARTED</a>
38   </div>
39+
40+  <p>
41+    This project was heavily inspired by
42+    <a href="https://patchbay.pub">patchbay.pub</a>
43+  </p>
44 </article>
45 
46 {{template "marketing-footer" .}}