Skip to content

Instantly share code, notes, and snippets.

View tony's full-sized avatar
💭
I may be slow to respond.

Tony Narlock tony

💭
I may be slow to respond.
View GitHub Profile
@tony
tony / constants.py
Last active February 15, 2024 14:34
libtmux / python: Schema of tmux options (tmux 3.4)
import enum
import typing as t
from dataclasses import dataclass, field
from libtmux._internal.dataclasses import SkipDefaultFieldsReprMixin
class ServerOptions(enum.Enum):
backspace = "backspace"
buffer_limit = "buffer-limit"
@tony
tony / INSTRUCTIONS
Created September 5, 2022 16:47
sphinx.ext.doctest issue with is_allowed_version
Run `python -m doctest example.py`
# Most of this is copied from Sphinx
# Credit:
# - https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f
# - https://gist.github.com/asmeurer/5009f8845f864bd671769d10e07d1184
from typing import Generator, List, TypeVar, Union
import sphinx.environment.collectors.toctree as toctree_collector
from docutils import nodes
from docutils.nodes import Element
from sphinx import addnodes
@tony
tony / README.md
Last active August 28, 2022 16:43
sphinxcontrib-issuetracker working as of sphinx 5.1.1, includes strict mypy typings (sphinx-doc with github style linking)
@tony
tony / develtech-cla.md
Last active January 10, 2022 17:29
develtech cla

develtech Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to develtech Software Foundation. ("develtech"). Except for the license granted herein to develtech and recipients of software distributed by develtech, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / social-embed-cla.md
Created January 10, 2022 17:27
social-embed contributor license agreement (CLA)

social-embed Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to social-embed Software Foundation. ("social-embed"). Except for the license granted herein to social-embed and recipients of software distributed by social-embed, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / vcs-python-cla.md
Created January 10, 2022 17:26
vcs-python contributor license agreement

vcs-python Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to vcs-python Software Foundation. ("vcs-python"). Except for the license granted herein to vcs-python and recipients of software distributed by vcs-python, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / tmux-python-cla.md
Last active January 10, 2022 17:25
tmux-python cla

tmux-python Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to tmux-python Software Foundation. ("tmux-python"). Except for the license granted herein to tmux-python and recipients of software distributed by tmux-python, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / Chart.tsx
Last active March 12, 2023 15:53
plotly.js react wrapper component (TypeScript, Functional Component, react-plotly.js alternative)
import React from "react";
import Plotly from "plotly.js/dist/plotly";
export interface ChartProps {
data?: Plotly.Data[];
layout: Partial<Plotly.Layout>;
frames?: Plotly.Frame[];
config?: Partial<Plotly.Config>;
// react-specific
style?: React.CSSProperties;
@tony
tony / pipfile-to-poetry.py
Last active December 16, 2019 15:15 — forked from sobolevn/pipfile-to-poetry.py
Formatting, check for errors for git packages
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import toml
def read_pipenv_lock():
with open('Pipfile.lock') as lock:
return json.loads(lock.read())