Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mstefaniuk on github.
  • I am marcinstefaniuk (https://keybase.io/marcinstefaniuk) on keybase.
  • I have a public key whose fingerprint is E8E6 5D9C 4E23 637D 8AFC F84E 4F12 B2EF A855 6642

To claim this, I am signing this object:

@mstefaniuk
mstefaniuk / LoadTest.java
Created February 11, 2016 14:23
RabbitMQ STOMP over WebSocket load test
package stomp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.springframework.http.HttpStatus;
import org.springframework.messaging.converter.StringMessageConverter;
import org.springframework.messaging.simp.stomp.*;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
== Singup workflow definition ==
var wf = {
name: "Simple signup process",
type: "$process",
document: "signup",
start: {
required: ["email","password"],
to: "pending"
},
== USER WITH USER ADMIN (or special group) PRIVILEGES ==
hoodie.user('adam@paradise.gov').addRole('farmer');
hoodie.store.create('valid/couchdb/dbname','skeleton');
hoodie.store.open('valid/couchdb/dbname').grantRole('farmer');
// role for managing users can be other than _admin because managed by node.js on behalf
// additional role in skeleton allowing to control who can create store from which kind of skeleton
== USER adam@paradise.gov ==
@mstefaniuk
mstefaniuk / Expecations in PEG.js error
Created October 12, 2011 13:37
Prividing expectations in PEG.js generated parser (last lines)
/*
* The parser is now in one of the following three states:
*
* 1. The parser successfully parsed the whole input.
*
* - |result !== null|
* - |pos === input.length|
* - |rightmostMatchFailuresExpected| may or may not contain something
*
* 2. The parser successfully parsed only a part of the input.