Skip to content

Instantly share code, notes, and snippets.

#
# tmux configuration file
#
# Use a better prefix
unbind C-b ; set -g prefix C-space
unbind C-s ; set -g prefix2 C-s
bind C-space last-window
set -g history-limit 16384
# Jujutsu (jj) Configuration File
'$schema' = 'https://jj-vcs.github.io/jj/latest/config-schema.json'
[ui]
default-command = 'status'
# Tool used for interactive diff editing
# diff-editor = 'meld' # Alternative: Meld GUI merge tool
import socket
import threading
import urllib.request
from http.server import SimpleHTTPRequestHandler, HTTPServer
import pytest
@pytest.fixture(scope="session", autouse=True)
def webserver():
"""Start a simple web server automatically for the test session."""
@dstanek
dstanek / panel.py
Created July 11, 2024 03:48
A really simple panel widget for Textual
# Copyright 2026 David Stanek <[email protected]>
from textual.containers import Vertical
class Panel(Vertical):
DEFAULT_CSS = """
Panel {
width: 1fr;
height: 1fr;
layout: vertical;
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
import csv
import sys
import urllib
import lxml.html
import requests
import requests_cache
requests_cache.install_cache('cache')
@dstanek
dstanek / encapsulated_visitor.py
Last active July 30, 2017 13:12
Some visitor examples
#!/usr/bin/env python3
# An example visitor where the visitor doesn't know the internal
# structure of the object heirarchy.
class Department:
def __init__(self, name, employees):
self._name = name
self._employees = employees
@dstanek
dstanek / example.yml
Created April 18, 2017 20:03
LXC on Fedora Ansible
---
- name: get LXC working on fedora
hosts: localhost
connection: local
become: true
become_user: root
tasks:
- package:
name: "{{ item }}"
# Copyright 2016 David Stanek <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Table structures:
limit_types:
id uuid
service string
name string
default int
project_limits:
id uuid