Skip to content

Instantly share code, notes, and snippets.

View joetyson's full-sized avatar

Joe Tyson joetyson

View GitHub Profile
@joetyson
joetyson / openpgp.txt
Created November 20, 2018 18:58
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:437907192069838c05f184769163a53e827c368c]
@joetyson
joetyson / openpgp.txt
Created November 20, 2018 14:15
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:754575c1ef1b73e06293a2113e548d448780b43a]
@joetyson
joetyson / openpgp.txt
Created November 20, 2018 14:15
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:754575c1ef1b73e06293a2113e548d448780b43a]

Keybase proof

I hereby claim:

  • I am joetyson on github.
  • I am joetyson (https://keybase.io/joetyson) on keybase.
  • I have a public key ASBl1nPakH6yHvNrFtw8-D7oyrjXgEVjwdkRxX8Z0F7ERgo

To claim this, I am signing this object:

var CreateRequest = protorpc.Message({
title: protorpc.fields.StringField(1),
options: protorpc.fields.StringField(2, {repeated: true})
});
var CreateResponse = protorpc.Message({
poll_id: protorpc.fields.IntegerField(1)
});
@joetyson
joetyson / poc.py
Created July 18, 2011 07:31
Super basic protobuf string encode/decode proof of concept
def varint32(v):
"""This works by taking an integer value and storing the two's
complement of the integer in groups of 7 bits"""
result = array.array('B')
# Check if the first bit is 0, if it is, there are no more groups.
if v & 127 == v:
result.append(v)
return result
while True:
bits = v & 127
import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from ndb import context
from ndb import tasklets
from ndb import model
pre_save = _ModelSignal()
post_save = _ModelSignal()
_INSTALLED = False
def install_hooks():
"""Installs hooks to receive updates for RPC calls to app engine"""
def pre_save_hook(service, call, request, response):
if call == 'Put':
def make_pretty_color():
"""Generates what Joe feels is a pretty color."""
code = ''.join([random.choice(map(chr, range(48, 58) + range(97, 103) )) for i in xrange(6)])
return '#' + code
<a href="http://foo.bar/">
<div id='example-bug'>
Hello, world.
</div>
</a>
<script type="text/javascript">
document.getElementById('example-bug').innerHTML='Hey, world.';
alert(document.getElementById('example-bug').innerHTML); // will return <a>Hey, world.</a> in firefox