Skip to content

Instantly share code, notes, and snippets.

View lholmquist's full-sized avatar

Lucas Holmquist lholmquist

View GitHub Profile
//this is using promises.
dm.stores.demo.open().then( function( value ) {
var data = [
{
"id": 1,
"name": "Lea",
"type": "Skywalker"
}
];
var pouchdb = require('pouchdb');
var db = PouchDB('coolcool');
PouchDB.destroy( 'coolcool', function( error, response ) {
console.log( "error", error );
console.log( "response", response );
});
var pipeline = AeroGear.Pipeline();
var pipey = pipeline.add( {
name: "pipey",
settings: {
baseURL: "your base URL",
endpoint: "/{pushAppid}/android/{variantId}/"
}
}).pipes.pipey;
send( params, function( err ) {
if( err ) {
throw something;
}
do other cool stuff
});
//No criteria, just a normal send( what use to be broadcast )
{
message: {
alert: "...",
sound: "...",
badge: "...",
"simple-push": "version=123"
}
}
@lholmquist
lholmquist / gist:6585576
Created September 16, 2013 19:44
holy verboseness
~/develop/projects/aerogear-simplepush-server(branch:master) » mvn -X clean install lholmquist@lincolnhawk
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_51, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /Users/lholmquist/.m2/settings.xml
running this:
~/develop/projects/aerogear-simplepush-server(branch:master) » mvn install -DskipTests=true
gives me this:
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 32 source files to /Users/lholmquist/develop/projects/aerogear-simplepush-server/netty-codec-sockjs/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
@lholmquist
lholmquist / gist:6194041
Last active December 20, 2015 20:59
Ember testing

###Router

App.Router.map( function() { this.resource( "mobileApps", function() { ... });

App.MobileAppsIndexRoute = App.Route.extend({
  ...

});

// Generated on 2013-06-20 using generator-webapp 0.2.2
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down: