Skip to content

Instantly share code, notes, and snippets.

@33mhz
33mhz / texnut
Created Mar 23, 2020
This has modified texnut (texapp for Pnut.io) to fix search, and include chat rooms like PM messages.
View texnut
#!/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 Mar 8, 2020
Pnut gallery channel
View gallery.pnut.json
@33mhz
33mhz / led.sh
Last active Feb 28, 2020
Compulab Fitlet2 LED Bash Script, more at https://paste.mcdemarco.net/m/149045
View led.sh
#!/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
Created Nov 3, 2019
Longpost broadcast post
View st.longpo.broadcast.json
{
"text": "String",
"raw": [
{
"type": "st.longpo.broadcast",
"value": {
"longpost_id": "Channel ID"
}
}
]
View st.longpo.content.json
{
"text": "String",
"raw": [
{
"type": "st.longpo.content",
"value": {
"body": "String"
}
}
]
View st.longpo.longpost.json
{
"type": "st.longpo.longpost",
"raw": [
{
"type": "st.longpo.longpost",
"value": {
"title": "String",
"category": "String"
}
}
@33mhz
33mhz / crosspost-with-source.md
Last active Oct 16, 2019
Pnut crosspost detail with source
View crosspost-with-source.md

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 Nov 1, 2018
Proposed core user contacts raw
View me.rafaelcosta.user.profiles.md

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 Mar 26, 2018
Create Pnut.io Poll
View poll.md
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\"
@33mhz
33mhz / reverse_markdown.md
Created Oct 6, 2017
reverse markdown from pnut entities
View reverse_markdown.md

Setup

This is pseudocode.

post has been retrieved from the API.

Be sure to make substrings and other string operations by "multibyte" divisions.

Operation

You can’t perform that action at this time.