Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
zbigniewTomczak / SSO Steps
Last active Sep 11, 2019
View SSO Steps
1. User accesses a custom application for the first time
2. Service Provider Security Filter checks if the security context is available
and redirects the user to IDP (Identity Provider) with a SAML SSO request
3. IDP challenges the user with the authentication dialog and redirects the user to
Request Assertion Consumer Service (RACS) after the user has authenticated
4. RACS validates the response from IDP, establishes a security context and redirects the user
to the original application endpoint
5. Service Provider Security Filter enforces that a valid security context is available and lets the user
access the custom application.
zbigniewTomczak / gist:a7986930272f5d88ff99
Last active May 31, 2017
JavaScript training links/materials
View gist:a7986930272f5d88ff99
for(var k in obj) {obj[k]};
Array.indexOf() // -1
apply, call
Closure (domknięcie)
View Heron-sqrt.scm
#; Heron's algorithm of calculating a square root
(define (abs x)
(if (< x 0) (- x) x))
(define (average x y)
(/ (+ x y) 2))
(define (improve guess x)
(average guess (/ x guess)))
zbigniewTomczak / click-to-load-time.js
Last active Dec 28, 2015
Measure Time from last click to page load
View click-to-load-time.js
// ==UserScript==
// @name Time from last click to page load
// @author Zbigniew Tomczak
// @namespace http://localhost/
// @version 2
// @grant none
// ==/UserScript==
all : {
if (!window.localStorage) {
zbigniewTomczak / 1Z0-898-tips
Created Sep 20, 2013
1Z0-898 JPA 2.0 Cert exam
View 1Z0-898-tips
I have passed today 1Z0-898 (Java EE 6 Java Persistence API Developer Certified Expert Exam) with 91%
My study was as follows:
1. Read completely "Pro JPA 2: mastering the Java Persistence API" by Mike Keith, Merrick Schincariol. Pro JPA 2.0 is very well written, highly recommended.
2. Completed all four tests in Enthuware's JPAD 6.
3. Read completely JPA 2.0 specification. JPA 2.0 specification is a Bible for this exam - must read.
4. Read second time Pro JPA 2.0.
5. Completed again all four tests from JPAD 6. Important: make sure you read all explanations from Enthuware's JPAD 6 - it has questions similar to ones you will get on the exam. All simulator's questions are relevant to the exam.
Some random tips for test takers:
View Function.prototype.method.js
Function.prototype.method = function(name, func) {
this.prototype[name] = func;
return this;
View technical-debt
zbigniewTomczak / aom-presentation
Created Sep 13, 2013
Adaptive Object Model Architecture Yoren
View aom-presentation

Whenever an UICommand component fails to invoke the associated action method or an UIInput element fails to update the model value, then verify the following:

  1. UICommand and UIInput components must be placed inside an UIForm component, e.g. <h:form>.

  2. You cannot nest multiple UIForm components in each other. This is namely illegal in HTML. Watch out with include files!

  3. No UIInput value validation/conversion error should have been occurred. You can use <h:messages> to show any messages which are not shown by any input-specific <h:message> components. Don't forget to include the id of <h:messages> in the <f:ajax render>, if any, so that it will be updated as well on ajax requests.

  4. If UICommand or UIInput components are placed inside an iterating component like <h:dataTable>, ui:repeat, etc, then you need to ensure that exactly the same value of the component is been preserved during the apply request values phase of the form submit request. JSF will namely reiterate over it to find the clicked l

zbigniewTomczak / jmap-heap-dump
Created Jun 15, 2013
java heap dump with jmap
View jmap-heap-dump
jmap -dump:file=D:\temp\heapdumps\dump.bin 1234