Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View offby1's full-sized avatar

Eric Hanchrow offby1

View GitHub Profile
@georgevreilly
georgevreilly / sessionrecorder.py
Last active June 15, 2023 14:45
WSGI Middleware to record Request and Response data
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
WSGI middleware to record requests and responses.
"""
from __future__ import print_function, unicode_literals
import logging

How to make a transcript; or, how to get lazy selfish people to help you for free

Often someone (generally me) will tell you to provide a transcript of a terminal session. Here’s how to do that.

Assuming that you’ve got a terminal open, and you’ve been interacting with it, and you want to publish those interactions so that someone else can examine them …

Copy the text

;; There's something similar (but fancier) in vc-git.el: vc-git-grep
;; -I means don't search through binary files
;; --no-color, oddly enough, is required to allow emacs to colorize the output
(defcustom git-grep-switches "--extended-regexp -I -n --ignore-case --no-color"
"Switches to pass to `git grep'."
:type 'string)