I hereby claim:
- I am pirate on github.
- I am nikisweeting (https://keybase.io/nikisweeting) on keybase.
- I have a public key ASAkuTPmwBtAZG-xmUmPOsqC7NN90ZmmCOXvUx1EcLtRKQo
To claim this, I am signing this object:
| def get_websocket_urls(routes): | |
| """Generate list of all /page/websocket routes from a list of routes""" | |
| for route in routes: | |
| url, handler = route[0], route[1] | |
| if hasattr(handler, 'socket'): | |
| ws_url = (url if url.endswith('/') else url + '/') + 'websocket' | |
| yield (ws_url, handler.socket.Handler) | |
| class BaseSocketHandler(BaseHandler, WebSocketHandler): |
| function getUrlParams(search) { | |
| const hashes = search.slice(search.indexOf('?') + 1).split('&') | |
| const params = {} | |
| hashes.map(hash => { | |
| const [key, val] = hash.split('=') | |
| params[key] = decodeURIComponent(val) | |
| }) | |
| return params | |
| } |
I hereby claim:
To claim this, I am signing this object:
| stems = ARGF.read | |
| .split | |
| .each_cons(2) | |
| .group_by { |word_pair| word_pair[0] } | |
| def next_word ary | |
| ary[rand(ary.length).to_i][1] | |
| end | |
| e = Enumerator.new do |e| |
| # -*- coding: utf-8 -*- | |
| # ~/.pythonrc | |
| # add this to your ~/.bashrc: | |
| # export PYTHONSTARTUP="~/.pythonrc" | |
| ### Common Useful Imports | |
| import os, sys | |
| import datetime, time, random | |
| import socket, json, re, pdb | |
| try: |
| def save(self, *args, **kwargs): | |
| if self.id: | |
| on_disk = Game.objects.get(pk=self.id) | |
| if on_disk.modified > self.modified: | |
| raise StaleWriteError('Tried to save outdated Game') | |
| super(Game, self).save(*args, **kwargs) |
| ul [ class "nav navbar-nav main-nav" ] | |
| [ li [ class "sup", attribute "data-what" "" ] | |
| [ a [ href "", title "Home" ] | |
| [ i [ class "fa fa-house" ] | |
| [] | |
| , text " Home " | |
| ] | |
| ] | |
| , li [ class "spacer" ] | |
| [ text "|" ] |
| import Inferno from 'inferno' | |
| import {Provider} from 'inferno-redux' | |
| import {createStore, combineReducers} from 'redux' | |
| window.initial_state = {} | |
| window.react_mount = document.getElementById('react') | |
| window.store = createStore( | |
| combineReducers({}), // reducers ommited because not needed to reproduce bug | |
| window.initial_state, | |
| ) |
| Process: python3.6 [2275] | |
| Path: /Users/USER/*/python3.6 | |
| Identifier: python3.6 | |
| Version: ??? | |
| Code Type: X86-64 (Native) | |
| Parent Process: fish [98071] | |
| Responsible: python3.6 [2275] | |
| User ID: 501 | |
| Date/Time: 2017-01-19 15:31:21.532 -0500 |
| #!/usr/bin/env python3.6 | |
| """ | |
| Code needed to reproduce a libssl segfault with python3.6 on mac. | |
| To run: | |
| brew upgrade python3 | |
| pip3 install websocket-client | |
| python3.6 libssl_bug.py |