Skip to content

Instantly share code, notes, and snippets.

INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [watcher]: Resolved files:
/tmp/node_modules/jasmine-core/lib/jasmine-core/jasmine.js
/tmp/node_modules/karma-jasmine/lib/boot.js
/tmp/node_modules/karma-jasmine/lib/adapter.js
/tmp/bower_components/es5-shim/es5-shim.js
/tmp/bower_components/angular/angular.js
/tmp/bower_components/pouchdb/dist/pouchdb.js
/tmp/bower_components/angular-mocks/angular-mocks.js
@tlvince
tlvince / index.html
Created January 6, 2015 18:47
PouchDB 3.2.0 changes
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
@tlvince
tlvince / index.html
Created January 6, 2015 18:45
PouchDB 3.2.1 changes
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
// service.js
angular.module('test', [])
.service('pouchdb', function($q, $window) {
var db = new $window.PouchDB('test');
this.info = function() {
return $q.when(db.info.apply(db, arguments));
};
})
.controller('test', function($scope, pouchdb) {
pouchdb.info()
@tlvince
tlvince / README.md
Created November 21, 2014 19:13
Quick and dirty Yeoman-Travis-Heroku deployment for static apps
  1. Add [grunt-build-control][] to your app:

    npm install --save grunt-build-control
  2. Append its Grunt task:

    buildcontrol: {
@tlvince
tlvince / index.html
Last active August 29, 2015 14:08
PouchDB authentication - require_valid_user testcase
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
'use strict';
describe('Angular PouchDB', function() {
beforeEach(module('pouchdb'));
var $rootScope, db;
beforeEach(inject(function(_$rootScope_, PouchDB) {
$rootScope = _$rootScope_;
db = new PouchDB('db');
}));
--- tooltip.js 2014-09-14 23:51:33.000000000 +0100
+++ tooltip-tlvince.js 2014-09-14 23:34:04.000000000 +0100
@@ -41,7 +41,6 @@
var $tooltip = {};
// Common vars
- var nodeName = element[0].nodeName.toLowerCase();
var options = $tooltip.$options = angular.extend({}, defaults, config);
$tooltip.$promise = fetchTemplate(options.template);
var scope = $tooltip.$scope = options.scope && options.scope.$new() || $rootScope.$new();
/**
* angular-strap
* @version v2.1.0 - 2014-09-05
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
'use strict';
angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions'])
@tlvince
tlvince / index.html
Created September 12, 2014 22:24
angular-pouchdb example
<html ng-app="app">
<body>
<div ng-controller="AppCtrl">
<button ng-click="add()">Add</button>
<ul>
<li ng-repeat="doc in docs">
<span ng-bind="doc|json"></span>
</li>
</ul>
</div>