Skip to content

Instantly share code, notes, and snippets.

@33mhz
33mhz / v1.0.md
Last active January 4, 2021 02:52
pnut v1.0 release notes

v0.9.6 will continue to be supported as-is until further notice except that user streams and app streams are no longer supported for v0.9.6. Streams will only work on v1 going forward.

All items below affect v1.0.0, and most do not affect v0.9.6. If it also affects v0.9.6, it will be marked with v0.9.6+.

Features

New Channel Fields

  • recent_deleted_message
@33mhz
33mhz / texnut
Last active December 30, 2022 15:26
This has modified texnut (texapp for Pnut.io) to fix search, include chat rooms, move to API v1.
#!/usr/bin/perl -s
#########################################################################
#
# Texnut v0.1 (c)2012-8 cameron kaiser (and contributors).
# all rights reserved.
#
# distributed under the floodgap free software license
# http://www.floodgap.com/software/ffsl/
#
# Oh Lord, stuck in Lodi again. -- Creedence Clearwater Revival
@33mhz
33mhz / gallery.pnut.json
Last active June 11, 2021 02:18
Pnut gallery channel
@33mhz
33mhz / led.sh
Last active February 28, 2020 01:33
Compulab Fitlet2 LED Bash Script, more at https://paste.mcdemarco.net/m/149045
#!/bin/bash
# GPIO Colors
# 435 = 1 green
# 436 = 1 yellow
# 437 = 2 green
# 438 = 2 yellow
# USAGE: led.sh [LED ID] [STATE]
# Example: sudo ./led.sh 1 yellow
@33mhz
33mhz / st.longpo.broadcast.json
Last active June 11, 2021 02:17
Longpost broadcast post
{
"text": "String",
"raw": {
"st.longpo.broadcast": [
{
"longpost_id": "Channel ID"
}
]
}
}
@33mhz
33mhz / st.longpo.content.json
Last active June 11, 2021 02:19
Longpost message
{
"text": "String",
"raw": {
"st.longpo.content": [
{
"body": "String"
}
]
}
}
@33mhz
33mhz / st.longpo.longpost.json
Last active June 11, 2021 02:20
Longpost channel
{
"type": "st.longpo.longpost",
"raw": {
"st.longpo.longpost": [
{
"title": "String",
"category": "String"
}
]
}
@33mhz
33mhz / crosspost-with-source.md
Last active October 16, 2019 20:45
Pnut crosspost detail with source

I believe all but canonical_url would be optional. But if including source, both url and name would be required. If including user, id would be required.

{
    "type": "io.pnut.core.crosspost",
    "value": {
        "canonical_url": "https://some-matrix-service.org/howeverthisgoes/123",
        "user": {
            "id": "@alice:example.com",
 "username": "alice",
@33mhz
33mhz / me.rafaelcosta.user.profiles.md
Last active November 1, 2018 14:47
Proposed core user contacts raw

External User Profiles

me.rafaelcosta.user.profiles

This raw lists a user's external profiles.

By convention, these are common options, but users or clients can specify their own also:

@33mhz
33mhz / poll.md
Created March 26, 2018 01:25
Create Pnut.io Poll
curl "https://api.pnut.io/v0/polls" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "Content-Type: application/json" \
    -d "{
  \"type\":\"general.poll\",
  \"prompt\":\"What is Pnut to you?\",
  \"options\":[
    {
 \"text\":\"My jam\"