Skip to content

Instantly share code, notes, and snippets.

View vadmium's full-sized avatar

Martin Panter vadmium

  • Melbourne, Australia
View GitHub Profile
@vadmium
vadmium / sbs.diff
Created January 13, 2012 13:34
SBS for Python-Iview
SBS for Python-Iview
* Overrides all the ABC Iview function, you only get SBS instead
* I hacked the internal interface for the list items in order to get the
front end to display multiple tree branches for the one SBS XML file, but
it should be done in a nicer way.
* Only works with the GTK version; probably breaks the CLI version
* I don’t think I ever finished the “Copy URL” button idea. But it would be
nice to be able to quickly pipe a URL into a video player and stream it
without worrying about downloading it.
@vadmium
vadmium / bad-output
Last active January 4, 2016 11:09
Demo of Subversion failure after cancellation
$ ./svn.exe
open http://gmapcatcher.googlecode.com/svn/trunk
get location segments
location segment receiver returning error 370001
location segments error 370001: Dummy message [intentional]
svn_error_clear() called
get log limit=1
log error 370001: Error running context: APR does not understand this error code child=(nil) [problem in >= 1.8.3]
[Exit 1]
@vadmium
vadmium / crash
Last active January 4, 2016 15:58 — forked from vadmium/bad-output
Crash after cancelling Subversion operation with temporary pool
$ pacman -Q subversion apr serf expat
subversion 1.8.5-2
apr 1.5.0-1
serf 1.3.2-1
expat 2.1.0-3
$ gdb --args ./svn.exe http://gmapcatcher.googlecode.com/svn/trunk
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
@vadmium
vadmium / GDB backtrace
Created September 21, 2014 03:41
MPV freeze dragging between monitors with VDPAU
$ gdb --args build/mpv run --vo vdpau -v --pause gif
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@vadmium
vadmium / udpsocks.py
Created October 23, 2014 08:37
Py Socks UDP example
#! /usr/bin/env python3
from sys import stdin, stderr
from socket import SOCK_DGRAM
from urllib.parse import SplitResult
import socket
import sys
import selectors
import net
@vadmium
vadmium / textbuffer.py
Created September 3, 2016 13:46
Mixin to add buffer attribute to text stream
from io import TextIOBase, RawIOBase, StringIO, BufferedRWPair
class _AsciiWrapper(RawIOBase):
'''Byte stream wrapping a TextIOBase stream via ASCII encoding'''
def __init__(self, text):
self._text = text
def close(self):
self._text.close()