Skip to content

Instantly share code, notes, and snippets.

View plato-cambrian's full-sized avatar

plato plato-cambrian

  • Central Services Inc.
View GitHub Profile
@plato-cambrian
plato-cambrian / gist:5887b960423265a1fb08
Created August 3, 2015 18:40
eventstore HPE_INVALID_CONSTANT
[06844,17,18:36:41.581] SLOW QUEUE MSG [Projections Master]: ReadStreamEventsBackwardCompleted - 66ms. Q: 4/7.
[06844,08,18:36:42.686] SLOW QUEUE MSG [MonitoringQueue]: SystemInit - 1514ms. Q: 0/3.
[06844,06,18:36:42.702] Created stats stream '$stats-192.168.10.206:2113', code = WrongExpectedVersion
Segments count: 1, buffers count: 512, should be when full: 512
[06844,03,18:36:45.641] External TCP connection accepted: [Normal, 192.168.10.206:50435, L192.168.10.206:1113, {3dc4b8b2-01e6-4dea-9423-9a7256e6d8e1}].
[06844,24,18:36:45.641] External TCP connection accepted: [Normal, 192.168.10.206:50436, L192.168.10.206:1113, {8a6fcf6a-503a-4746-9a7f-2f70c61ea27f}].
[06844,03,18:36:45.669] FRAMING ERROR! Data:
000000: 47 45 54 20 2F 70 72 6F 6A 65 63 74 69 6F 6E 73 | GET /projections
000016: 2F 63 6F 6E 74 69 6E 75 6F 75 73 3F 6E 61 6D 65 | /continuous?name
000032: 3D 63 68 61 6E 6E 65 6C 73 4D 75 6C 74 69 70 6C | =channelsMultipl
@plato-cambrian
plato-cambrian / gist:78b62ecc44ca803641b0
Created June 30, 2015 22:01
CordovaActivity failure
:modules:AGCordova:processReleaseManifest
:modules:AGCordova:processReleaseResources
:modules:AGCordova:generateReleaseSources
:modules:AGCordova:compileReleaseJava/Users/administrator/app-builder/STAGING/client/modules/AGCordova/src/com/borismus/webintent/WebIntent.java:6: error: cannot find symbol
import org.apache.cordova.CordovaActivity;
^
symbol: class CordovaActivity
location: package org.apache.cordova
/Users/administrator/app-builder/STAGING/client/modules/AGCordova/src/com/borismus/webintent/WebIntent.java:76: error: cannot find symbol
Intent i = ((CordovaActivity)this.cordova.getActivity()).getIntent();
@plato-cambrian
plato-cambrian / plugin.xml
Created June 30, 2015 21:46
plato cordova share plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Plato's fork of yoik's work at https://github.com/yoik/cordova-yoik-intent-filter -->
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.therealplato.cordova.plugins.intentfilter"
version="0.0.1">
<name>Android plaintext Intent filter</name>

Here’s a situation I need to filter some restaurants by location, then when I get the results I need to filter those restaurant’s items by price, then when the price filter is done I need to filter those items by tag names.

you frequently end up with a bunch of nested async calls:
  restsAtLoc(loc, function(rests){
    filterItemsByPrice(items, function(filtered){
 filterItemsByTagNames(items, tags, function(filtered){
// foo.js
var demo = "foobar";
require('./baz.js')();
// baz.js
module.exports = function(){
console.log(demo)
}
// npm install -g jasmine-node
// jasmine-node jasmineLoopSpec.js
// output: https://gist.github.com/plato-cambrian/f7cb3efb7fd130502eac
var coords = [{x:0, y: 0}];
describe('coords', function(){
it('coords[0] matches every x in width and y in height', function(){
var i = 0;
for(var x = 0; x < width; ++x) {
for(var y = 0; y < height; ++y) {
expect(coords[i].x).toBe(x);
/c/dev/src/tmp/jasmine-loops
$ jasmine-node jasmineLoopsSpec.js
F
Failures:
1) coords coords[0] matches every x in width and y in height
Message:
ReferenceError: width is not defined
Stacktrace:
it("exists",function(){
});
describe("japi.groups.list()",function() {
it("exists",function(){
});
it("is a method", function() {
});
it('returns an array', function(){
<link href="../topeka-elements/category-images.html" rel="import">
<link href="../core-icon/core-icon.html" rel="import">
<link href="../core-icons/core-icons.html" rel="import">
<link href="../core-icons/av-icons.html" rel="import">
<link href="../paper-fab/paper-fab.html" rel="import">
<polymer-element name="my-element">
<template>
<style>