- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import contextlib | |
| import json | |
| import os.path | |
| import subprocess | |
| import tempfile | |
| import time | |
| from varlink import Client | |
| IMG = "quay.io/libpod/alpine_nginx:latest" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env buildahscript | |
| #| pip: requests | |
| #| arg: eula: bool | |
| #| arg: version: str = "latest" | |
| #| arg: type: str = "vanilla" | |
| with TemporaryDirectory() as td: | |
| bin = td / 'bin' | |
| bin.mkdir() | |
| with workspace('rust:buster') as build: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Launches and manages uMTP-Responder with better cleanup. | |
| """ | |
| import contextlib | |
| import os | |
| from pathlib import Path | |
| import subprocess | |
| import tempfile | |
| import time |
Creates & pushes empty commits without disturbing your index or workspace
- Copy
git-boop.shtogit-boopon your$PATH - Run
git boop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def mutate_url(url, *, | |
| username=None, password=None, hostname=None, port=None, **kwargs | |
| ): | |
| import urllib.parse | |
| bits = urllib.parse.urlparse(url) | |
| assert not ( (username or password or hostname or port) and 'netloc' in kwargs ) # noqa | |
| if username or password or hostname or port: | |
| # FIXME: url encoding | |
| u = username or bits.username | |
| w = password or bits.password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- AstroNvim Configuration Table | |
| -- All configuration changes should go inside of the table below | |
| -- You can think of a Lua "table" as a dictionary like data structure the | |
| -- normal format is "key = value". These also handle array like data structures | |
| -- where a value with no key simply has an implicit numeric key | |
| local config = { | |
| -- Configure AstroNvim updates | |
| updater = { |
Basic Capabilities:
- WiFi
- Local SSH identity (hardware backed?)
- Mosh (wishful thinking)
- Text mode interface
- Batteries with decent life
- Good keyboard
- Local UI for some configuration options
- Non-trivial fonts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| This looks in its directory for files. It looks in the format | |
| `playlist/artist/album/1. title.ext`, allowing components to be omitted. | |
| Requires ffmpeg. | |
| """ | |
| import os | |
| from pathlib import Path | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import base64 | |
| import logging | |
| import paramiko | |
| from paramiko.agent import AgentServerProxy | |
| from paramiko.sftp import SFTP_NO_SUCH_FILE | |
| from paramikosocket import SocketServerInterface, run_server |