Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Bengtsson peterbe

View GitHub Profile
View gist:4e52f2f351b6809df303
INDEX= airmozillatest-events
FLUSH? {u'_shards': {u'successful': 5, u'failed': 0, u'total': 10}}
REFRESH? {u'_shards': {u'successful': 5, u'failed': 0, u'total': 10}}
{u'hits': {u'hits': [{u'_score': 1.0, u'_type': u'event', u'_id': u'23', u'_source': {u'channels': [], u'title': u'Mozilla Festival', u'tags': [u'PartyTag'], u'privacy': u'public'}, u'_index': u'airmozillatest-events'}, {u'_score': 1.0, u'_type': u'event', u'_id': u'22', u'_source': {u'channels': [u'Main'], u'title': u'Test event', u'tags': [u'SomeTag'], u'privacy': u'public'}, u'_index': u'airmozillatest-events'}], u'total': 2, u'max_score': 1.0}, u'_shards': {u'successful': 5, u'failed': 0, u'total': 5}, u'took': 1, u'timed_out': False}
View test_related.py
@peterbe
peterbe / gist:0b15d2fcb8348642fba0
Created Aug 28, 2015
Long logging message sent by sorl
View gist:0b15d2fcb8348642fba0
>>> print messages[11]
<191>Peters-MacBook-Pro.local http_app_playdoh: [] sorl.thumbnail.base:DEBUG Creating thumbnail file [cache/c4/1a/c41a339f12ebac5746c67ea3317774e9.png] at [160x90] with [{u'rounded': None, u'padding_color': u'#ffffff', 'format': 'PNG', u'colorspace': u'RGB', u'cropbox': None, u'padding': False, u'upscale': True, 'crop': 'center', u'image_info': {'dpi': (72, 72), 'icc_profile': '\x00\x00\x0cHLino\x02\x10\x00\x00mntrRGB XYZ \x07\xce\x00\x02\x00\t\x00\x06\x001\x00\x00acspMSFT\x00\x00\x00\x00IEC sRGB\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xd6\x00\x01\x00\x00\x00\x00\xd3-HP \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11cprt\x00\x00\x01P\x00\x00\x003desc\x00\x00\x01\x84\x00\x00\x00lwtpt\x00\x00\x01\xf0\x00\x00\x00\x14bkpt\x00\x00\x02\x04\x00\x00\x00\x14rXYZ\x00\x00\x02\x18\x00\x00\x00\x14gXYZ\x00\x00\x02,\x00\x00\x00\x14bXYZ\x0
View gist:d198ef9b35b2f54c242f
^C(airmozilla):~/airmozilla (status-page-for-edits *+$)$ ./manage.py cron render_popcorn
Raven is not configured (logging is disabled). Please see the documentation for more information.
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
configuration: --prefix=/opt/boxen/homebrew/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.
View gist:8699219
airmozilla=# select user_id, url, file_name, size, suggested_event_id from uploads_upload;
user_id | url | file_name | size | suggested_event_id
---------+----------------------------------------------------------------------------+---------------------------------------------------------+----------+--------------------
5 | https://air-mozilla-uploads.s3.amazonaws.com/2014/01/14/5-61899-235618.jpg | photo 4.JPG | 6411384 |
5 | https://air-mozilla-uploads.s3.amazonaws.com/2014/01/15/5-61899-180720.jpg | photo 4.JPG | 6411384 |
5 | https://air-mozilla-uploads.s3.amazonaws.com/2014/01/14/5-71763-235928.csv | Analytics All Web Site Data Pages 20131223-20140102.csv | 1237 | 97
5 | https://air-mozilla-uploads.s3.amazonaws.com/2014/01/15/5-61899-003516.jpg | ph
View gist:8836083
# name: application
# doc: the fully qualified module or class of the application
# converter: configman.converters.class_converter
application='MiddlewareApp'
[database]
+include /Users/peterbe/dev/MOZILLA/SOCORRO/stage-db.ini
[web_server]
View gist:8869999
(airmozilla)peterbe@mpb:~/airmozilla (master %)$ james.py stage master
Environment: stage
Pushing as : peterbe
Pushing : master (ae863aa6)
On server : 4d0e4836
Pushing out:
ae863aa fixes bug 967643 - hide location on all 'Cyberspace' events
78c784d fixes bug 966506 - prevent submission of pre-recorded events without file
f7536ea It's 'Upload' not 'Uplpad'
f5ec062 more verbose jenkins install of requirements/compiled.txt
View gist:8873914
>>> in_groups('mail@peterbe.com', 'pretty people')
{u'meta': {u'limit': 20,
u'next': None,
u'offset': 0,
u'previous': None,
u'total_count': 1},
u'objects': [{u'accounts': [],
u'allows_community_sites': True,
u'allows_mozilla_sites': True,
u'bio': u'',
View gist:8985031
breakpad=# \d graphics_device
Table "public.graphics_device"
Column | Type | Modifiers
--------------------+---------+------------------------------------------------------------------------------
graphics_device_id | integer | not null default nextval('graphics_device_graphics_device_id_seq'::regclass)
vendor_hex | text |
adapter_hex | text |
vendor_name | text |
adapter_name | text |
Indexes:
View gist:9004829
import psycopg2
import os, sys
import csv
import code
queryfile = sys.argv[1]
args = sys.argv[2:]
query = open(queryfile).read()