Skip to content

Instantly share code, notes, and snippets.

View kumar303's full-sized avatar
💭
🍉

Kumar McMillan kumar303

💭
🍉
View GitHub Profile
@kumar303
kumar303 / gist:9652453
Created March 19, 2014 22:05
travis ci example
language: node_js
node_js:
- 0.10
before_script:
- npm rebuild
script: grunt karma:run
@kumar303
kumar303 / gist:9652443
Created March 19, 2014 22:04
PhantomJS example
grunt.initConfig({
karma: {
run: {
configFile: 'karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
},
}
});
@kumar303
kumar303 / gist:9652425
Last active August 29, 2015 13:57
sinon example
describe('fxpay', function () {
describe('API', function() {
var api;
var server;
beforeEach(function() {
api = new fxpay.API();
server = sinon.fakeServer.create();
});
@kumar303
kumar303 / gist:9652415
Last active August 29, 2015 13:57
mocha example
describe('fxpay', function() {
describe('purchase()', function() {
it('should error if mozPay() is undefined', function(done) {
var productId = '123';
fxpay.purchase(productId, {
onpurchase: function(error) {
assert.equal(error, 'PAY_PLATFORM_UNAVAILABLE');
done();
},
@kumar303
kumar303 / gist:9652404
Created March 19, 2014 22:02
karma dev example
grunt.initConfig({
karma: {
dev: {
configFile: 'karma.conf.js',
autoWatch: true
}
}
});
@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
},
},
});
@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: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: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 / 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
#