- commit
- c928786
- parent
- 354f418
- author
- Eric Bower
- date
- 2024-09-09 13:57:29 +0000 UTC
docs(pubsub): copy
4 files changed,
+11,
-785
+1,
-1
1@@ -8,7 +8,7 @@
2
3 <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
4
5- <meta name="keywords" content="pastebin, paste, copy, snippets" />
6+ <meta name="keywords" content="pubsub, ssh, event, publish, subscribe" />
7 {{template "meta" .}}
8
9 <link rel="stylesheet" href="https://pico.sh/smol.css" />
+10,
-16
1@@ -10,18 +10,6 @@
2 <meta property="og:url" content="https://{{.Site.Domain}}">
3 <meta property="og:title" content="{{.Site.Domain}}">
4 <meta property="og:description" content="pubsub using ssh">
5-
6-<meta name="twitter:card" content="summary" />
7-<meta property="twitter:url" content="https://{{.Site.Domain}}">
8-<meta property="twitter:title" content="{{.Site.Domain}}">
9-<meta property="twitter:description" content="pubsub using ssh">
10-<meta name="twitter:image" content="https://{{.Site.Domain}}/card.png" />
11-<meta name="twitter:image:src" content="https://{{.Site.Domain}}/card.png" />
12-
13-<meta property="og:image:width" content="300" />
14-<meta property="og:image:height" content="300" />
15-<meta itemprop="image" content="https://{{.Site.Domain}}/card.png" />
16-<meta property="og:image" content="https://{{.Site.Domain}}/card.png" />
17 {{end}}
18
19 {{define "attrs"}}class="container-sm"{{end}}
20@@ -36,13 +24,15 @@
21 <article>
22 <p>
23 The simplest authenticated pubsub system. Send messages through
24- user-defined channels. Channels are private to the authenticated
25+ user-defined channels. By default, channels are private to the authenticated
26 ssh user. The default pubsub model is multicast with bidirectional
27 blocking, meaning a publisher (<code>pub</code>) will send its message to all
28 subscribers (<code>sub</code>) on a channel. Further, both <code>pub</code> and
29 <code>sub</code> will wait for at least one event to be sent or received on the channel.
30 </p>
31
32+ <blockquote>This service is undergoing active development, expect bugs and restarts</blockquote>
33+
34 <div>
35 <h2 class="text-xl">A basic API</h2>
36 <pre>ssh {{.Site.Domain}} sub mykey</pre>
37@@ -51,20 +41,20 @@
38
39 <div>
40 <h2 class="text-xl">Simple desktop notifications</h2>
41- <pre>ssh {{.Site.Domain}} sub notify | notify-send "job done!"</pre>
42+ <pre>ssh {{.Site.Domain}} sub notify; notify-send "job done!"</pre>
43 <pre>./longjob.sh; ssh {{.Site.Domain}} pub notify -e</pre>
44 </div>
45
46 <div>
47 <h2 class="text-xl">Simple CI/CD</h2>
48- <pre>ssh {{.Site.Domain}} sub myimg | docker pull myimg && docker up -d dev</pre>
49+ <pre>ssh {{.Site.Domain}} sub myimg; docker pull myimg && docker up -d dev</pre>
50 <pre>docker buildx build --push -t myimg .; ssh {{.Site.Domain}} pub myimg -e</pre>
51 </div>
52
53 <div>
54 <h2 class="text-xl">Send a public message</h2>
55 <pre>echo "hello world!" | ssh send.pico.sh pub mychan -p</pre>
56- <p>Now anyone with a <code>pico</code> can subscribe to this channel:</p>
57+ <p>Now anyone with a <code>pico</code> account can subscribe to this channel:</p>
58 <pre>ssh send.pico.sh sub mychan -p</pre>
59 </div>
60
61@@ -82,6 +72,10 @@
62 <a href="https://patchbay.pub">patchbay.pub</a>
63 </p>
64
65+ <p>
66+ built on our <a href="https://github.com/picosh/pubsub">go pkg</a>.
67+ </p>
68+
69 <div class="text-center">
70 <a href="https://pico.sh/getting-started" class="btn-link my-2 inline-block">GET STARTED</a>
71 </div>
+0,
-0
+0,
-768
1@@ -1,768 +0,0 @@
2-*,
3-::before,
4-::after {
5- box-sizing: border-box;
6-}
7-
8-::-moz-focus-inner {
9- border-style: none;
10- padding: 0;
11-}
12-:-moz-focusring {
13- outline: 1px dotted ButtonText;
14-}
15-:-moz-ui-invalid {
16- box-shadow: none;
17-}
18-
19-@media (prefers-color-scheme: light) {
20- :root {
21- --main-hue: 250;
22- --white: #2e3f53;
23- --white-light: #cfe0f4;
24- --white-dark: #6c6a6a;
25- --code: #52576f;
26- --pre: #e1e7ee;
27- --bg-color: #f4f4f4;
28- --text-color: #24292f;
29- --link-color: #005cc5;
30- --visited: #6f42c1;
31- --blockquote: #005cc5;
32- --blockquote-bg: #cfe0f4;
33- --hover: #c11e7a;
34- --grey: #ccc;
35- --grey-light: #6a708e;
36- --shadow: #e8e8e8;
37- }
38-}
39-
40-@media (prefers-color-scheme: dark) {
41- :root {
42- --main-hue: 250;
43- --white: #f2f2f2;
44- --white-light: #f2f2f2;
45- --white-dark: #e8e8e8;
46- --code: #414558;
47- --pre: #252525;
48- --bg-color: #282a36;
49- --text-color: #f2f2f2;
50- --link-color: #8be9fd;
51- --visited: #bd93f9;
52- --blockquote: #bd93f9;
53- --blockquote-bg: #353548;
54- --hover: #ff80bf;
55- --grey: #414558;
56- --grey-light: #6a708e;
57- --shadow: #252525;
58- }
59-}
60-
61-html {
62- background-color: var(--bg-color);
63- color: var(--text-color);
64- font-size: 18px;
65- line-height: 1.5;
66- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
67- Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
68- sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
69- -webkit-text-size-adjust: 100%;
70- -moz-tab-size: 4;
71- -o-tab-size: 4;
72- tab-size: 4;
73-}
74-
75-body {
76- margin: 0 auto;
77-}
78-
79-img {
80- max-width: 100%;
81- height: auto;
82-}
83-
84-b,
85-strong {
86- font-weight: bold;
87-}
88-
89-code,
90-kbd,
91-samp,
92-pre {
93- font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo,
94- monospace;
95-}
96-
97-code,
98-kbd,
99-samp {
100- border: 2px solid var(--code);
101-}
102-
103-pre > code {
104- background-color: inherit;
105- padding: 0;
106- border: none;
107-}
108-
109-code {
110- font-size: 90%;
111- border-radius: 0.3rem;
112- padding: 0.1rem 0.3rem;
113-}
114-
115-pre {
116- font-size: 14px;
117- border-radius: 5px;
118- padding: 1rem;
119- margin: 1rem 0;
120- overflow-x: auto;
121- background-color: var(--pre) !important;
122-}
123-
124-small {
125- font-size: 0.8rem;
126-}
127-
128-summary {
129- display: list-item;
130- cursor: pointer;
131-}
132-
133-h1,
134-h2,
135-h3,
136-h4 {
137- margin: 0;
138- padding: 0.5rem 0 0 0;
139- border: 0;
140- font-style: normal;
141- font-weight: inherit;
142- font-size: inherit;
143-}
144-
145-path {
146- fill: var(--text-color);
147- stroke: var(--text-color);
148-}
149-
150-hr {
151- color: inherit;
152- border: 0;
153- margin: 0;
154- height: 2px;
155- background: var(--grey);
156- margin: 1rem auto;
157- text-align: center;
158-}
159-
160-a {
161- text-decoration: none;
162- color: var(--link-color);
163-}
164-
165-a:hover,
166-a:visited:hover {
167- text-decoration: underline;
168- color: var(--hover);
169-}
170-
171-a:visited {
172- color: var(--visited);
173-}
174-
175-a.link-grey {
176- text-decoration: underline;
177- color: var(--white);
178-}
179-
180-a.link-grey:visited {
181- color: var(--white);
182-}
183-
184-section {
185- margin-bottom: 1.4rem;
186-}
187-
188-section:last-child {
189- margin-bottom: 0;
190-}
191-
192-header {
193- margin: 1rem auto;
194-}
195-
196-p {
197- margin: 0.5rem 0;
198-}
199-
200-article {
201- overflow-wrap: break-word;
202-}
203-
204-blockquote {
205- border-left: 5px solid var(--blockquote);
206- background-color: var(--blockquote-bg);
207- padding: 0.5rem 0.75rem;
208- margin: 0.5rem 0;
209-}
210-
211-blockquote > p {
212- margin: 0;
213-}
214-
215-blockquote code {
216- border: 1px solid var(--blockquote);
217-}
218-
219-ul,
220-ol {
221- padding: 0 0 0 1rem;
222- list-style-position: outside;
223-}
224-
225-ul[style*="list-style-type: none;"] {
226- padding: 0;
227-}
228-
229-li {
230- margin: 0.5rem 0;
231-}
232-
233-li > pre {
234- padding: 0;
235-}
236-
237-footer {
238- text-align: center;
239- margin-bottom: 4rem;
240-}
241-
242-dt {
243- font-weight: bold;
244-}
245-
246-dd {
247- margin-left: 0;
248-}
249-
250-dd:not(:last-child) {
251- margin-bottom: 0.5rem;
252-}
253-
254-figure {
255- margin: 0;
256-}
257-
258-.container {
259- max-width: 50em;
260- width: 100%;
261-}
262-
263-.container-sm {
264- max-width: 40em;
265- width: 100%;
266-}
267-
268-.container-center {
269- width: 100%;
270- height: 100%;
271- display: flex;
272- justify-content: center;
273-}
274-
275-.mono {
276- font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo,
277- monospace;
278-}
279-
280-.link-alt-adj,
281-.link-alt-adj:visited,
282-.link-alt-adj:visited:hover,
283-.link-alt-adj:hover {
284- color: var(--link-color);
285- text-decoration: none;
286-}
287-
288-.link-alt-adj:visited:hover,
289-.link-alt-adj:hover {
290- text-decoration: underline;
291-}
292-
293-.link-alt-hover,
294-.link-alt-hover:visited,
295-.link-alt-hover:visited:hover,
296-.link-alt-hover:hover {
297- color: var(--hover);
298- text-decoration: none;
299-}
300-
301-.link-alt-hover:visited:hover,
302-.link-alt-hover:hover {
303- text-decoration: underline;
304-}
305-
306-.link-alt,
307-.link-alt:visited,
308-.link-alt:visited:hover,
309-.link-alt:hover {
310- color: var(--white);
311- text-decoration: none;
312-}
313-
314-.link-alt:visited:hover,
315-.link-alt:hover {
316- text-decoration: underline;
317-}
318-
319-.text-3xl {
320- font-size: 2.5rem;
321-}
322-
323-.text-2xl {
324- font-size: 1.9rem;
325- line-height: 1.15;
326-}
327-
328-.text-xl {
329- font-size: 1.55rem;
330- line-height: 1.15;
331-}
332-
333-.text-lg {
334- font-size: 1.35rem;
335- line-height: 1.15;
336-}
337-
338-.text-md {
339- font-size: 1.15rem;
340- line-height: 1.15;
341-}
342-
343-.text-sm {
344- font-size: 0.875rem;
345-}
346-
347-.text-xs {
348- font-size: 0.775rem;
349-}
350-
351-.cursor-pointer {
352- cursor: pointer;
353-}
354-
355-.w-full {
356- width: 100%;
357-}
358-
359-.h-full {
360- height: 100%;
361-}
362-
363-.border {
364- border: 2px solid var(--grey-light);
365-}
366-
367-.text-left {
368- text-align: left;
369-}
370-
371-.text-center {
372- text-align: center;
373-}
374-
375-.text-underline {
376- border-bottom: 3px solid var(--text-color);
377- padding-bottom: 3px;
378-}
379-
380-.text-hdr {
381- color: var(--hover);
382-}
383-
384-.text-underline-hdr {
385- border-bottom: 3px solid var(--hover);
386- padding-bottom: 3px;
387-}
388-
389-.font-bold {
390- font-weight: bold;
391-}
392-
393-.font-italic {
394- font-style: italic;
395-}
396-
397-.inline {
398- display: inline;
399-}
400-
401-.inline-block {
402- display: inline-block;
403-}
404-
405-.max-w-half {
406- max-width: 50%;
407-}
408-
409-.h-screen {
410- height: 100vh;
411-}
412-
413-.w-screen {
414- width: 100vw;
415-}
416-
417-.flex {
418- display: flex;
419-}
420-
421-.flex-col {
422- flex-direction: column;
423-}
424-
425-.items-center {
426- align-items: center;
427-}
428-
429-.m-0 {
430- margin: 0;
431-}
432-
433-.mt {
434- margin-top: 0.5rem;
435-}
436-
437-.mt-2 {
438- margin-top: 1rem;
439-}
440-
441-.mt-4 {
442- margin-top: 2rem;
443-}
444-
445-.mt-8 {
446- margin-top: 4rem;
447-}
448-
449-.mb {
450- margin-bottom: 0.5rem;
451-}
452-
453-.mb-2 {
454- margin-bottom: 1rem;
455-}
456-
457-.mb-4 {
458- margin-bottom: 2rem;
459-}
460-
461-.mb-8 {
462- margin-bottom: 4rem;
463-}
464-
465-.mb-16 {
466- margin-bottom: 8rem;
467-}
468-
469-.mr {
470- margin-right: 0.5rem;
471-}
472-
473-.ml-sm {
474- margin-left: 0.25rem;
475-}
476-
477-.ml {
478- margin-left: 0.5rem;
479-}
480-
481-.pt-0 {
482- padding-top: 0;
483-}
484-
485-.my {
486- margin-top: 0.5rem;
487- margin-bottom: 0.5rem;
488-}
489-
490-.my-2 {
491- margin-top: 1rem;
492- margin-bottom: 1rem;
493-}
494-
495-.my-4 {
496- margin-top: 2rem;
497- margin-bottom: 2rem;
498-}
499-
500-.my-8 {
501- margin-top: 4rem;
502- margin-bottom: 4rem;
503-}
504-
505-.mx {
506- margin-left: 0.5rem;
507- margin-right: 0.5rem;
508-}
509-
510-.mx-2 {
511- margin-left: 1rem;
512- margin-right: 1rem;
513-}
514-
515-.m-1 {
516- margin: 0.5rem;
517-}
518-
519-.p-1 {
520- padding: 0.5rem;
521-}
522-
523-.p-0 {
524- padding: 0;
525-}
526-
527-.px-2 {
528- padding-left: 1rem;
529- padding-right: 1rem;
530-}
531-
532-.px-4 {
533- padding-left: 2rem;
534- padding-right: 2rem;
535-}
536-
537-.py {
538- padding-top: 0.5rem;
539- padding-bottom: 0.5rem;
540-}
541-
542-.py-2 {
543- padding-top: 1rem;
544- padding-bottom: 1rem;
545-}
546-
547-.py-4 {
548- padding-top: 2rem;
549- padding-bottom: 2rem;
550-}
551-
552-.py-8 {
553- padding-top: 4rem;
554- padding-bottom: 4rem;
555-}
556-
557-.justify-between {
558- justify-content: space-between;
559-}
560-
561-.justify-center {
562- justify-content: center;
563-}
564-
565-.gap {
566- gap: 0.5rem;
567-}
568-
569-.gap-2 {
570- gap: 1rem;
571-}
572-
573-.group {
574- display: flex;
575- flex-direction: column;
576- gap: 0.5rem;
577-}
578-
579-.group-2 {
580- display: flex;
581- flex-direction: column;
582- gap: 1rem;
583-}
584-
585-.group-h {
586- display: flex;
587- gap: 0.5rem;
588- align-items: center;
589-}
590-
591-.flex-1 {
592- flex: 1;
593-}
594-
595-.items-end {
596- align-items: end;
597-}
598-
599-.items-start {
600- align-items: start;
601-}
602-
603-.justify-end {
604- justify-content: end;
605-}
606-
607-.font-grey-light {
608- color: var(--grey-light);
609-}
610-
611-.hidden {
612- display: none;
613-}
614-
615-.align-right {
616- text-align: right;
617-}
618-
619-/* ==== MARKDOWN ==== */
620-
621-.md h1,
622-.md h2,
623-.md h3,
624-.md h4 {
625- padding: 0;
626- margin: 1.5rem 0 0.9rem 0;
627- font-weight: bold;
628-}
629-
630-.md h1 a,
631-.md h2 a,
632-.md h3 a,
633-.md h4 a {
634- color: var(--grey-light);
635- text-decoration: none;
636-}
637-
638-.md h1 {
639- font-size: 1.6rem;
640- line-height: 1.15;
641- border-bottom: 2px solid var(--grey);
642- padding-bottom: 0.7rem;
643-}
644-
645-.md h2 {
646- font-size: 1.3rem;
647- line-height: 1.15;
648- color: var(--white-dark);
649-}
650-
651-.md h3 {
652- font-size: 1.2rem;
653- color: var(--white-dark);
654-}
655-
656-.md h4 {
657- font-size: 1rem;
658- color: var(--white-dark);
659-}
660-
661-/* ==== HELPERS ==== */
662-
663-.logo-header {
664- line-height: 1;
665- display: inline-block;
666- background-color: #FF79C6;
667- background-image: linear-gradient(to right, #FF5555, #FF79C6, #F8F859);
668- color: transparent;
669- background-clip: text;
670- border: 3px solid #FF79C6;
671- padding: 8px 10px 10px 10px;
672- border-radius: 10px;
673- box-shadow: 0px 5px 0px 0px var(--shadow);
674- background-size: 100%;
675- -webkit-background-clip: text;
676- -moz-background-clip: text;
677- -webkit-text-fill-color: transparent;
678- -moz-text-fill-color: transparent;
679-}
680-
681-.btn {
682- border: 2px solid var(--link-color);
683- color: var(--link-color);
684- padding: 0.4rem 1rem;
685- font-weight: bold;
686- display: inline-block;
687-}
688-
689-.btn-link,
690-.btn-link:visited {
691- border: 2px solid var(--link-color);
692- color: var(--link-color);
693- padding: 0.4rem 1rem;
694- text-decoration: none;
695- font-weight: bold;
696- display: inline-block;
697-}
698-
699-.btn-link:visited:hover,
700-.btn-link:hover {
701- border: 2px solid var(--hover);
702-}
703-
704-.btn-link-alt,
705-.btn-link-alt:visited {
706- border: 2px solid var(--white);
707- color: var(--white);
708-}
709-
710-.box {
711- border: 2px solid var(--grey-light);
712- padding: 0.5rem 0.75rem;
713-}
714-
715-.box-sm {
716- border: 2px solid var(--grey-light);
717- padding: 0.15rem 0.35rem;
718-}
719-
720-.box-alert {
721- border: 2px solid var(--hover);
722- padding: 0.5rem 0.75rem;
723-}
724-
725-.box-sm-alert {
726- border: 2px solid var(--hover);
727- padding: 0.15rem 0.35rem;
728-}
729-
730-.list-none {
731- list-style-type: none;
732-}
733-
734-.list-disc {
735- list-style-type: disc;
736-}
737-
738-.list-decimal {
739- list-style-type: decimal;
740-}
741-
742-.pill {
743- border: 1px solid var(--link-color);
744- color: var(--link-color);
745-}
746-
747-.pill-alert {
748- border: 1px solid var(--hover);
749- color: var(--hover);
750-}
751-
752-.pill-info {
753- border: 1px solid var(--visited);
754- color: var(--visited);
755-}
756-
757-@media only screen and (max-width: 40em) {
758- body {
759- padding: 0 1rem;
760- }
761-
762- header {
763- margin: 0;
764- }
765-
766- .flex-collapse {
767- flex-direction: column;
768- }
769-}