Skip to content

Instantly share code, notes, and snippets.

View kumar303's full-sized avatar
💭
🍉

Kumar McMillan kumar303

💭
🍉
View GitHub Profile
#
# Generated with the following command and then edited.
# docker-compose run web ./manage.py show_urls > ~/tmp/olympia-urls.txt
#
# If a URL starts with a minus then it shouldn't be marked as non-atomic.
# If a URL starts with a hash then it's ignored.
#
/ addons.views.home home
/<var>/moreinfo.php browse.views.moreinfo_redirect
# /__debug__/render_panel/ debug_toolbar.views.render_panel render_panel
import manage # this initializes Django
import datetime
import hashlib
import pprint
import traceback
from collections import defaultdict
from amo.utils import chunked
from constants.base import VALID_STATUSES
@kumar303
kumar303 / b2g-http-log.sh
Last active December 14, 2015 07:59
Turn on http logging for B2G
#!/bin/bash
#
# This is a script you can run to turn on HTTP
# logging for a B2G device.
# It's not fully automatic. It will start B2G on the
# the device with logging enabled but when you quit (^C)
# you have to pull the log down from the device like this:
#
# adb pull /data/local/tmp/http.log
#
@kumar303
kumar303 / gist:5054083
Created February 28, 2013 04:06 — forked from jrgm/gist:4490638
#!/bin/sh
# You may of course prefer not to trust this script and do the below
# manually, step by step, with an editor, etc., ;-).
#
# make /system/bin writable
#
DISK_DEVICE=`adb shell mount | grep '/system' | awk '{ print $1 }'`
adb shell "mount -o remount,rw $DISK_DEVICE /system"
pref("dom.payment.provider.0.name", "firefoxmarket");
pref("dom.payment.provider.0.description", "marketplace.firefox.com");
pref("dom.payment.provider.0.uri", "https://marketplace.firefox.com/mozpay/?req=");
pref("dom.payment.provider.0.type", "mozilla/payments/pay/v1");
pref("dom.payment.provider.0.requestMethod", "GET");

We're about to release some tools for developers to sign add-ons so they can publish the .xpi files to their own site as opposed to hosting them on addons.mozilla.org. This would let users install the add-ons in a release or beta channel when add-on signatures are required.

Can you help test what we have so far? Here's how:

  • Clone jpm and install it so you can run jpm from your shell:
git clone https://github.com/mozilla-jetpack/jpm.git
cd jpm
npm install
@kumar303
kumar303 / chirp-contrib-email.txt
Created November 5, 2012 16:55
Boilerplate email for first time CHIRP contributors
Hi there.
Thanks for your interest in CHIRP Radio's tech projects. The first thing is to jump on our low traffic discussion list where we announce projects and meetups: https://groups.google.com/group/chirpdev/
Let us know what type of things you are most interested in. Here is an overview of the project: http://code.google.com/p/chirpradio/ Here is a brief of summary of places you can help:
- MP3 importer and digital library manager (Python): https://github.com/chirpradio/chirpradio-machine
- A web based MP3 importer (Python/HTML5): https://github.com/chirpradio/chirpradio-webcontrol
- DJ tools (Python/HTML5): https://github.com/chirpradio/chirpradio
- Volunteer tracker (Python/HTML5): https://github.com/chirpradio/chirpradio-volunteers
- Android app (Java): https://github.com/chirpradio/chirpradio-android/
diff --git a/scripts/update/update.py b/scripts/update/update.py
index 5cffb9b..9b98318 100644
--- a/scripts/update/update.py
+++ b/scripts/update/update.py
@@ -43,6 +43,7 @@ def update_code(ctx, ref='origin/master'):
ctx.local("git fetch && git fetch -t")
ctx.local("git checkout -f %s" % ref)
ctx.local("git submodule sync")
+ ctx.local("git submodule update --init --recursive")
# `submodule sync` doesn't do `--recursive` yet. (P.S. We `sync` twice
@kumar303
kumar303 / git-check.sh
Created June 16, 2011 21:08
Checks all changed and new files for pyflakes and pep8 errors (requires check.py)
# Runs new and changed Python files through check.py and other checks
# https://github.com/jbalogh/check
if [ "$1" = "--help" ]; then
echo "usage: `basename $0` [<commit>{0,2}]"
exit 1
fi
if [ "$1" != "" ]; then
REV=$1
fi
git diff $REV --check
@kumar303
kumar303 / patch.diff
Created September 3, 2015 17:43
payments-ui tests without Provider
diff --git a/tests/apps/test.management-app.jsx b/tests/apps/test.management-app.jsx
index 23836ec..dcdf9ba 100644
--- a/tests/apps/test.management-app.jsx
+++ b/tests/apps/test.management-app.jsx
@@ -2,7 +2,6 @@ import React from 'react';
import TestUtils from 'react/lib/ReactTestUtils';
import * as appActions from 'actions/app';
-import { createReduxStore } from 'data-store';