Skip to content

Instantly share code, notes, and snippets.

View kumar303's full-sized avatar
💭
🍉

Kumar McMillan kumar303

💭
🍉
View GitHub Profile
@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
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 / 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/
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");
@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"
@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:8785701
Created February 3, 2014 15:18
Firefox OS payment prefs
/*
These are Firefox OS device settings for testing payments in Marketplace Dev and Stage.
1. Download this gist and call it user.js
2. Run these commands from your shell to install it on device:
adb shell "stop b2g"
adb push ~/Downloads/user.js /data/local/
@kumar303
kumar303 / gist:9371022
Created March 5, 2014 16:43
brew troubleshooting output
$ brew doctor
Warning: A Python is installed in /Library/Frameworks
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.
Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
@kumar303
kumar303 / gist:9652343
Created March 19, 2014 22:00
uglify example
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
my_target: {
files: {
'build/myscript.min.js': ['lib/myscript.js']
}
}
}
});
@kumar303
kumar303 / gist:9652380
Created March 19, 2014 22:01
karma example
module.exports = function(grunt) {
grunt.initConfig({
karma: {
run: {
configFile: 'karma.conf.js',
singleRun: true
},
},
});