Skip to content

Instantly share code, notes, and snippets.

View abstractj's full-sized avatar

Bruno Oliveira da Silva abstractj

View GitHub Profile
[root@a0a6ab069db0 /]# rpm -qa
crypto-policies-20211116-1.gitae470d6.el8.noarch
redhat-release-8.6-0.1.el8.x86_64
filesystem-3.8-6.el8.x86_64
publicsuffix-list-dafsa-20180723-1.el8.noarch
pcre2-10.32-2.el8.x86_64
ncurses-libs-6.1-9.20180224.el8.x86_64
glibc-common-2.28-189.1.el8.x86_64
bash-4.4.20-3.el8.x86_64
zlib-1.2.11-18.el8_5.x86_64
# is the url for retrieve the openid configuration - normally the <server>/auth/realm/<realm_name>
discovery-url: http://localhost:8180/auth/realms/summit
# the client id for the 'client' application
client-id: go-rest
# the interface definition you wish the proxy to listen, all interfaces is specified as ':<port>'
listen: 127.0.0.1:4000
# log all incoming requests
enable-logging: true
# log in json format
@abstractj
abstractj / gist:d7e1ca70519184ed1e8701be6729ebbf
Created June 21, 2017 22:59 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.

Keybase proof

I hereby claim:

  • I am abstractj on github.
  • I am abstractj (https://keybase.io/abstractj) on keybase.
  • I have a public key ASBfGo7shb5SfjU1zcjC4TTW9bKOGbf4zHxRRujNftdcnwo

To claim this, I am signing this object:

if (!this.identity.isLoggedIn()) {
this.credentials.setUserId(saleAgent.getLoginName());
this.credentials.setPassword(saleAgent.getPassword());
this.identity.login();
} else {
throw new RuntimeException("Authentication failed");
}
@abstractj
abstractj / shot.js
Created July 25, 2013 20:07 — forked from ahomu/shot.js
console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://localhost:1947/';
page.viewportSize = {
width: 1024,
height: 768
};
page.open(url, function (status) {
//Page is loaded!
var iz, i = 0, queue = {};
  1. Deploy aerogear-controller-demo
  2. Try ios-otp-demo to login and validate otp
  3. Log in to aerogear-controller-demo with user 'john'
  4. Use the restricted admin page to register a new user
  5. Delete the newly created user
  6. Try the iso-otp-demo once again. For me the error below will be displayed in the servers console
11:00:24,761 INFO  [stdout] (http--127.0.0.1-8080-3) [Demo Error handler :null
11:00:24,788 ERROR [org.jboss.ejb3.invocation] (http--127.0.0.1-8080-3) JBAS014134: EJB Invocation failed on component Otp for method public org.jboss.aerogear.security.model.AeroGearUser org.jboss.aerogear.controller.demo.Otp.secret(): javax.ejb.EJBException: java.lang.NullPointerException

This is my route :

route().from("/customers/{id}")
.on(RequestMethod.GET)
.consumes(JSON).produces(JSON)
.to(CustomerEndpoint.class)
.findById(param("id");

This the method of my endpoint :

Pagination RESTFul API on AeroGear Controller

This document describes pagination in AeroGear. It defines the metadata passed between the client and server.

Parameters

  • offset
    The offset of the first element that should be included in the returned collection. Default value is 0.
  • limit
    The number of elements that should be returned. Default value is 10
  • total
    The total number of elements available.
@abstractj
abstractj / gist:4537563
Last active December 11, 2015 03:28 — forked from danbev/gist:4537431

Pagination RESTFul API on AeroGear Controller

This document describes pagination in AeroGear. This includes the client APIs (Android, JavaScript, and iOS) and also the server side (AeroGear Controller)

Parameters

  • offset
    The offset of the first element that should be included in the returned collection. Default value is 0.
  • limit
    The number of elements that should be returned. Default value is 10
  • total
    The total number of elements available.