View async-middleware.md
async def monitoring(handler, root, info: ResolveInfo, **kwargs):
    t_start = time.perf_counter()
    result = handler(root, info, **kwargs)

    if not isawaitable(result):
        return result

    result = await result
    duration = max(time.perf_counter() - t_start, 0)
View magic-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View README.md

Hide tabs in Firefox 57

Place userChrome.css in ~/.mozilla/firefox/*.default/chrome/. Create the chrome folder if it does not exist.

  • Hide the tab bar at the top of the window.
  • Shrink sidebar-header.
  • Make sidebar-header dark.
View gunicorn_logging.py
import gunicorn.glogging
import structlog
_logger = structlog.get_logger(__name__)
class Logger(gunicorn.glogging.Logger):
def setup(self, cfg):
"""
View keybase.md

Keybase proof

I hereby claim:

  • I am joar on github.
  • I am joar (https://keybase.io/joar) on keybase.
  • I have a public key ASDguJoosHWHVEV2ET5ZsmTMDMbBz9Nf36vJ8ZzIxFEsnQo

To claim this, I am signing this object:

View lib-tty.py
"""Terminal utilities."""
# Author: Steen Lumholt.
from termios import *
__all__ = ["setraw", "setcbreak"]
# Indexes for termios list.
IFLAG = 0
View kubectl.fish
# Subcommand parsing
function __kctl_pos_args
set -l pos_args (__fish_print_cmd_args_without_options)
# echo __fish_print_cmd_args_without_options pos_args $pos_args > /dev/stderr
# remove "kubectl"
set -e pos_args[1]
string join \n $pos_args
end
View clean.jq
map_values(. = {"ios-apps"})
| map_values(map_values(map_values(.enabled)) | all)
| keys