Skip to content

Instantly share code, notes, and snippets.

View sebastienblanc's full-sized avatar

Sebastien Blanc sebastienblanc

View GitHub Profile
@sebastienblanc
sebastienblanc / gist:5222680
Last active December 15, 2015 07:19
Aerogear Scaffolding with AG Controller stuff

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 :

// the test case
function testReaddir() {
fs.readdir(basedir, function(e,r) {
vassert.assertTrue(r.length>0);
vassert.testComplete();
})
}
//try 1
this.readdir = function(path, callback) {
this.readdir = function(path, callback) {
vertx.fileSystem.readDir(path, function(result) {
callback(undefined,result);
} );
}
function invertAndConvert(x){
var e = parseInt(x).toString(2);
var bitArray = e.split("");
var convertedString = "";
if(bitArray[0]=="0") {
convertedString = convertedString.concat("-");
}
else {
convertedString = convertedString.concat("r");
}
package org.jboss.forge.scaffold.angularjs;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
package org.jboss.forge.scaffold.angularjs;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
var leaguePipe = AeroGear.Pipeline();
pipeline.add( "leagues", {
baseURL: "http://soccer.org/",
}).leagues;
//READ "teams" for league "seattle"
leaguePipe.read({
id: "seattle",
resource: "/teams",
success: function( data ){

Hi,

Today when we set up a Pipe and call methods on it, we have a different ways on how we can pass the stuff which are part of the URI and more particularly the leading or ending "/" :

baseURL: "http://www.slackers.com" //no ending slash 
endpoint: "/security" //we have to start with a slash

But we can also do it the otherr way around :

@sebastienblanc
sebastienblanc / gist:5366523
Last active December 16, 2015 02:59
Rapid Mobile Application Development with Java EE: Live Coding Session

Rapid Mobile Application Development with Java EE: Live Coding Session

This live coding session shows how to build from scratch a complete Mobile Web Application, including a modern HTML5 Front End and a secured JavaEE backend.

A variety of Open Source projects are featured including Aerogear for Mobile and Forge for the tooling part. Scaffolding, Convention over Configuration, Keep it Simple and Don't Repeat Yourself are the key concepts of this talk.

This is an interactive session where the audience where the audience can participate with their laptops, get their hands dirty and learn a bunch of silver bullets such as turning the Web Application into a Native (hybrid) one or easily adding a two-factor authenfication mechanism.

Summary

{
"security":
"generateLoginForm" : true,
"generateOTPPage" : true,
"entities" : {
"org.sebi.Task" : {
"GET": {
"authentification" : false,
"authorization" : false
},