Skip to content

Instantly share code, notes, and snippets.

View eviljeff's full-sized avatar

Andrew Williamson eviljeff

View GitHub Profile
This file has been truncated, but you can view the full file.
Attaching to olympia_addons-frontend_1
addons-frontend_1 | yarn run v1.16.0
addons-frontend_1 | $ better-npm-run amo
addons-frontend_1 | running better-npm-run in /srv/code
addons-frontend_1 | Executing script: amo
addons-frontend_1 |
addons-frontend_1 | to be executed: better-npm-run start-dev-proxy
addons-frontend_1 | running better-npm-run in /srv/code
addons-frontend_1 | Executing script: start-dev-proxy
addons-frontend_1 |
@eviljeff
eviljeff / bulkaddcerts.py
Last active January 3, 2017 18:32
snippet to be run in django-admin shell `./manage.py shell` to bulk add certs from 'certs.txt' file in format [issuer: xx serial: yy].
from olympia.blocklist.models import BlocklistDetail, BlocklistIssuerCert
def addCert(issuer, serial, name, bug):
detail = BlocklistDetail(name=name, why='.', who='.', bug=bug)
detail.save()
cert = BlocklistIssuerCert(issuer=issuer, serial=serial, details=detail)
cert.save()
@eviljeff
eviljeff / gist:1650135f066eb43c78d1
Last active August 29, 2015 14:23
icon fixer-up-er
UPDATE addons SET icontype = 'image/png' WHERE icontype = '' and icon_hash is not null and icon_hash <> 'crushed';
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#
# This program modifies the prefs.js file on the given device so that
# trusted marketplaces for installing signed privileged apps can be
# added/removed *FOR TESTING PURPOSES ONLY*.
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#
# This program replaces the certificate database on a device with the contents
# of a local certificate database. Usually it is used in conjunction with the
# other scripts in this directory as described in ./README.txt.
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#
# This program replaces the certificate database on a device with the contents
# of a local certificate database. Usually it is used in conjunction with the
# other scripts in this directory as described in ./README.txt.
@eviljeff
eviljeff / gist:ba00a916d8603827a6b1
Created November 14, 2014 16:20
SQL to output which approved & undisabled apps have at least one version that requires flash
select addons.id from
(SELECT * FROM addons WHERE status IN (2, 4, 13, 16) AND inactive = 0) AS addons
JOIN versions ON (versions.addon_id=addons.id)
JOIN (select * FROM files where uses_flash=1) AS files ON (files.version_id=versions.id)
GROUP BY addons.id;
@eviljeff
eviljeff / quickpush.sh
Created October 29, 2014 17:50
quickpush.sh
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#
# This program replaces the certificate database on a device with the contents
# of a local certificate database. Usually it is used in conjunction with the
# other scripts in this directory as described in ./README.txt.
ADDON_EXTENSION = 1
ADDON_DICT = 3
ADDON_LPADDON = 6 # maybe - I'm not sure what it is
ADDON_PLUGIN = 7
ADDON_API = 8