Skip to content

Instantly share code, notes, and snippets.

View mikelambert's full-sized avatar

Mike Lambert mikelambert

View GitHub Profile
@mikelambert
mikelambert / models.txt
Created April 28, 2017 01:47
gcloud firebase test android models list
┌─────────────┬──────────┬───────────────────────────┬──────────┬─────────────┬────────────────┬──────────────┐
│ MODEL_ID │ MAKE │ MODEL_NAME │ FORM │ RESOLUTION │ OS_VERSION_IDS │ TAGS │
├─────────────┼──────────┼───────────────────────────┼──────────┼─────────────┼────────────────┼──────────────┤
│ A0001 │ OnePlus │ OnePlus One │ PHYSICAL │ 1920 x 1080 │ 22 │ │
│ D6503 │ Sony │ Xperia Z2 │ PHYSICAL │ 1920 x 1080 │ 21 │ │
│ D6603 │ Sony │ Xperia Z3 │ PHYSICAL │ 1920 x 1080 │ 21 │ │
│ E5803 │ Sony │ Xperia Z5 Compact │ PHYSICAL │ 1280 x 720 │ 22 │ │
│ F5121 │ Sony │ Sony Xperia X │ PHYSICAL │ 1920 x 1080 │ 23 │ │
│ Nexus10 │ Samsung │ Nexus 10 │ VIRTUAL │ 2560 x 1600 │ 19,21,22 │ │
@mikelambert
mikelambert / keybase.md
Created October 12, 2016 04:49
keybase.md

Keybase proof

I hereby claim:

  • I am mikelambert on github.
  • I am mlambert (https://keybase.io/mlambert) on keybase.
  • I have a public key ASCHXR6Qg58dNPYigw28xpjs7vyFLsrBBAILbk1vBGf9Igo

To claim this, I am signing this object:

@mikelambert
mikelambert / ProportionalImage.js
Created April 13, 2016 12:24
Renders an Image that stays proportionally sized to its original dimensions.
var ProportionalImage = React.createClass({
getInitialState() {
return {
style: {}
};
},
propTypes: {
originalWidth: React.PropTypes.number.isRequired,
@mikelambert
mikelambert / shub_add_egg.sh
Created March 12, 2016 23:00
Auto-build and deploy eggs to scrapinghub
#!/bin/bash
# Should be called with "shub_add_egg.sh PROJECT_ID PIP_PACKAGE_NAME"
#
set -e
cd $(mktemp -d)
PIP_OUTPUT=$(pip download $2)
TAR_GZ=$(echo $PIP_OUTPUT | grep -o "[^ ]*.tar.gz" | head -1)
tar xzf $TAR_GZ
cd $(dirname $(find . -name 'setup.py'))
BDIST_OUTPUT=$(python setup.py bdist_egg)
@mikelambert
mikelambert / gist:6615b37fa326c1008a4b
Created February 28, 2015 09:58
A hacky attempt to fix the RPC starvation problems I encountered with the NDB eventloops.
# This attempts to force a FIFO ordering on RPC execution in the eventloop (as opposed to random RPC execution)
RPC_ORDERING = True
if RPC_ORDERING:
import collections
from google.appengine.ext.ndb import eventloop
class OrderedEventLoop(eventloop.EventLoop):
def __init__(self):
super(OrderedEventLoop, self).__init__()
self.rpcs = collections.OrderedDict()