Skip to content

Instantly share code, notes, and snippets.

Mark Williams markrwilliams

Block or report user

Report or block markrwilliams

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .Xdefaults
XTerm*Background: white
XTerm*Foreground: black
XTerm*metaSendsEscape: true
XTerm*faceName: inconsolata
XTerm*faceSize: 12
UXTerm*Background: black
UXTerm*Foreground: white
UXTerm*metaSendsEscape: true
UXTerm*font: -*-fixed-medium-*-*-*-14-*-*-*-*-*-*-*
View xmonad.hs
{-# LANGUAGE FlexibleContexts #-}
import XMonad hiding ( (|||) )
import XMonad.Hooks.ManageDocks
import XMonad.Util.EZConfig
import XMonad.Hooks.DynamicLog
import XMonad.Layout.LayoutCombinators
import XMonad.Layout.Renamed
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS
import XMonad.Layout.LayoutModifier
View bug.py
from twisted.internet.defer import Deferred
from twisted.trial.unittest import TestCase
class Race(TestCase):
def test_thing(self):
outer, inner = Deferred(), Deferred()
def raiser(_):
raise ValueError()
View broken.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View .xmobarrc
Config { font = "-terminus-medium-*-*-*-*-14-*-*-*-*-*-*-*"
, additionalFonts = []
, borderColor = "black"
, border = TopB
, bgColor = "darkblue"
, fgColor = "grey"
, alpha = 255
, position = Top
, textOffset = -1
, iconOffset = -1
View DISTTRIAL_PY3.md

What?

A demonstration of disttrial dropping tracebacks under Python 3

How?

  1. Clone this gist
  2. Create a Python 3 virtual environment
  3. Install this gist into the virtualenv with pip install .
  4. Look at the traceback from trial trialJTraceback
View example.py
def invalid_but_irrelevant():
print("I am invalid but also irrelevant")
def invalid_but_relevant():
print("I am invalid and relevant")
@markrwilliams
markrwilliams / .pypirc
Created Mar 1, 2018
test.pypi.org HTTP 410 with missing trailing slash
View .pypirc
[distutils]
index-servers=
test
[test]
repository: https://test.pypi.org/legacy
View keepalive_demo.py
import argparse
import socket
parser = argparse.ArgumentParser(description="keepalive example")
parser.add_argument("mode", choices=("server", "client"))
def server():
listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
You can’t perform that action at this time.