Skip to content

Instantly share code, notes, and snippets.

Eric Reynolds ericremoreynolds

Block or report user

Report or block ericremoreynolds

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
ericremoreynolds /
Last active Mar 5, 2019
Key-like functionality recipe for Python's bisect functions
class KeyifyList(object):
def __init__(self, inner, key):
self.inner = inner
self.key = key
def __len__(self):
return len(self.inner)
def __getitem__(self, k):
return self.key(self.inner[k])
ericremoreynolds / client.html
Last active Nov 12, 2019 emit to specific clients
View client.html
<h1>I feel lonely</h1>
<script type="text/javascript" src="//"></script>
<script type="text/javascript" src="//"></script>
<script type="text/javascript" charset="utf-8">
var socket = io.connect('http://' + document.domain + ':' + location.port);
socket.on('connect', function() {
You can’t perform that action at this time.