Skip to content

Instantly share code, notes, and snippets.

snek snek snek snek

Jamie Bliss astronouth7303

snek snek snek snek
Block or report user

Report or block astronouth7303

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
astronouth7303 /
Created Feb 8, 2020
Untitled RPC Protocol

(Unnamed RPC Protocol)

  • Pulls a bunch of ideals from varlink
  • Encoded as two msgpack streams, one in each direction
  • The stream is broken up into channels, where there is a single call and potentially many responses.
  • Method names are forward-dotted paths (eg com.foobar.service.Method)
  • Parameters and returns are both maps; at the application level, methods only take keyword arguments and return named return values
  • Methods may return 0 or more returns or errors
astronouth7303 /
Last active Jan 26, 2020
buildahscript proof of concept
#!/usr/bin/env buildahscript
#| pip: requests
#| arg: eula: bool
#| arg: version: str = "latest"
#| arg: type: str = "vanilla"
with TemporaryDirectory() as td:
bin = td / 'bin'
with workspace('rust:buster') as build:
astronouth7303 /
Created Jan 8, 2020
Podman Varlink Networking Tests
import contextlib
import json
import os.path
import subprocess
import tempfile
import time
from varlink import Client
IMG = ""
import enum
import dataclasses
import struct
import asyncio
import weakref
class InvalidPacket(Exception):
astronouth7303 /
Last active Aug 28, 2019
Importable GraphQL

The basic idea: Define GraphQL queries as importable modules.

For example:

# queries.gql

query HeroForEpisode($ep: Episode!) {
  hero(episode: $ep) {
astronouth7303 /
Last active Aug 5, 2019
How to make a chrome "app"
astronouth7303 / 99-phonebackup.rules
Created Mar 16, 2019
Automatic Phone Backup (via udev and systemd)
View 99-phonebackup.rules
ACTION=="add", ENV{ID_SERIAL}=="*?", RUN+="/home/astraluma/udev-handler"
import pathlib
__all__ = ('root',)
class AttrsView(
def __init__(self, root):
self._root = pathlib.Path(root)
import functools
from gi.repository import GObject
from gi.repository import Gio
from gi.repository import GLib
def runloop(func):
def wrapped(*pargs, **kwargs):
astronouth7303 /
Last active Dec 10, 2018
Python Async+SSH

Proof of Concept of using Python+Async to connect to a server over SSH.


  • Python >= 3.6
  • msgpack
  • tornado<5

Run, assumes you're running ssh-server on localhost and that you can log in to it.

You can’t perform that action at this time.