Skip to content

Instantly share code, notes, and snippets.

Avatar
💩
hacking hacking hacking!

Matthias Wessendorf matzew

💩
hacking hacking hacking!
View GitHub Profile
@matzew
matzew / galera_cluster.yml
Last active Mar 7, 2017 — forked from lucidfrontier45/galera_cluster.yml
docker-compose file for mariadb galera cluster
View galera_cluster.yml
node1:
image: hauptmedia/mariadb:10.1
hostname: node1
ports:
- 13306:3306
environment:
- MYSQL_ROOT_PASSWORD=unifiedpush
- REPLICATION_PASSWORD=unifiedpush
- MYSQL_DATABASE=unifiedpush
- MYSQL_USER=unifiedpush
View foo.js
var express = require('express');
var router = express.Router();
// my few includes
require('./foo_1')(router);
require('./foo_2')(router);
module.exports = router;
View gist:ed0055000a8347488a37

User Management via Keycloak for the AeroGear Unfied Push Server

Introduction

The goal of this document is to describe how the User Management (based on Keycloak) will be implemented in the UnifiedPush Server. Currently there is only one user (admin) created by default when installing UPS. Having the possibility to create multiple (non-admin) users via the Keycloak Admin Console is a Must Have. Some roles should also be introduced.

Roles / Permissions

View gist:5361389
var leaguePipe = AeroGear.Pipeline();
pipeline.add( "leagues", {
baseURL: "http://soccer.org/",
}).leagues;
//READ "teams" for league "seattle":
// http://soccer.org/leagues/seattle/teams
leaguePipe.read({
id: "seattle",
resource: "/teams",
View gist:5263365

1. Install Forge

Instructions can be found here : http://forge.jboss.org/docs/using/

2. Install feature branch of ag-controller

AG Controller scaffolding needs some features only available in a branch : Clone this repo :

https://github.com/sebastienblanc/aerogear-controller

and check out this branch :

View paging-usage-comparison.md

Below is a comparison of the method usage proposed by each lib for handling paged resources.

Read Next Page

Android

ReadFilter filter = new ReadFilter();
filter.setLimit(5);
@matzew
matzew / gist:3892035
Created Oct 15, 2012 — forked from danbev/gist:3871798
RestEasy Integration
View gist:3892035

RestEasy Integration with AeroGear Controller

This document is intended to describe AeroGear Controllers integration with RestEasy.

Background

Currently, the routes that AeroGear Controller can handle are "one way" in the sense that they go through AeroGear Controller are forwarded to a view, which can be populated by a data model provided by the Controller for the route in question.
For example:

route()
      .from("/customers/{id}")
      .on(RequestMethod.GET)
View gist:3891749
class Pipeline {
PipeBuilder add() {
return new PipeBuilder(this);
}
}
class Pipebuilder {
PipeBuilder withUrl(..)
....
....
@matzew
matzew / gist:3857191
Created Oct 9, 2012 — forked from cvasilak/gist:3851304
FAQ or Wiki or ...
View gist:3857191
  • What is a pipeline ?

A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.

  • What is a pipe ?

A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.

Below is an example from our JavaScript lib:

@matzew
matzew / gist:3838816
Created Oct 5, 2012 — forked from kborchers/gist:3833435
FAQ or Wiki or ...
View gist:3838816
  • What is a pipeline ?

A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.

  • What is a pipe ?

A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.

Below is an example from our JavaScript lib: