I hereby claim:
- I am zoni on github.
- I am nickgroenen (https://keybase.io/nickgroenen) on keybase.
- I have a public key whose fingerprint is B19D EB40 69BC 0FF8 EE16 BA64 4F0A D019 928A E098
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| import os | |
| import subprocess | |
| from datetime import datetime | |
| from pathlib import Path | |
| from zoneinfo import ZoneInfo | |
| import frontmatter |
| from pathlib import Path | |
| from starlite import Response, Starlite, TemplateConfig, get | |
| from starlite.contrib.jinja import JinjaTemplateEngine | |
| from starlite.status_codes import HTTP_307_TEMPORARY_REDIRECT | |
| @get("/{name:str}", include_in_schema=False) | |
| def hello(name: str = "world") -> Response: | |
| if name == "foo": |
| import asyncio | |
| import os | |
| from pprint import pprint | |
| async def do_work(): | |
| """Schedule and run a bunch of tasks that do nothing but sleep""" | |
| tasks = [asyncio.create_task(asyncio.sleep(duration)) for duration in [0, 1, 3, 5]] | |
| results, _ = await asyncio.wait(tasks) | |
| return results |
| #!/bin/bash | |
| : ${TEXT_COLLECTOR_DIR:="/var/tmp/node_exporter"} | |
| OUTPUT_FILE=${TEXT_COLLECTOR_DIR}/apt.prom | |
| TEMP_OUTPUT_FILE=${OUTPUT_FILE}.tmp | |
| upgrades=$(/usr/lib/update-notifier/apt-check 2>&1) | |
| # output format for apt-check is $upgrades;$security_upgrades | |
| ( |
| use anyhow::{Context, Result}; | |
| use criterion::{black_box, criterion_group, criterion_main, Criterion}; | |
| use std::error::Error; | |
| use std::fmt; | |
| #[derive(Debug)] | |
| struct FooError {} | |
| fn foo() -> Result<(), FooError> { | |
| Err(FooError {}) |
| [program:errbot] | |
| command = /srv/errbot/virtualenv/bin/errbot --config /srv/errbot/config.py | |
| user = errbot | |
| stdout_logfile = /var/log/supervisor/errbot.log | |
| stderr_logfile = NONE | |
| redirect_stderr = true | |
| directory = /srv/errbot/ | |
| startsecs = 3 | |
| stopsignal = INT | |
| environment = LC_ALL="en_US.UTF-8" |
I hereby claim:
To claim this, I am signing this object:
| [Core] | |
| Name = SendHello | |
| Module = sendhello | |
| [Python] | |
| Version = 2+ | |
| [Documentation] | |
| Description = Demonstrating self.send() |
| Certificates may be created with the help of invoke. This is geared towards | |
| use of StartSSL certificates, but does not enforce this (--no-startssl). | |
| See `invoke --help` for general help on invoke, including useage of how | |
| to list all tasks and their corresponding help and option flags. | |
| To create a new key: | |
| invoke createkey foo.domain.tld.key |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Ansible module to manage iptables rules | |
| Written by Nick Groenen <[email protected]>. If you get your hands on a | |
| copy of this code, please feel free to do with it whatever you like. | |
| """ |