I am loosing interest

I am loosing interest in interacting with the world.

Loosing interest in job.

Loosing interest in books.

May be I should change something.

Advertisements

The way I feel

A-Project-Management-Framework-Organizing-Planning-Controlling-Projects

Office work is not challenging enough for me. May be I should quit the job and look for a job that pays better and at the same time encourages me to work hard. I should try AWS, Scala, vertx.io and Kafka.

I need to grow fit. I need to try Wing Tsun and some cardio and swimming. May be socialize a little more. I need people before I go totally go crazy.

The only thing that is going good perhaps is my book reading. But then I must catch up with German. There is not point attending classes in the office as that is just a sham. I will have to enroll myself in some decent class and pick up faster. I know that it’s the lack of German that is preventing me from being vocal.

Impossible?

3948513021_29180d16e5_z

 

Could you master a language at B2 level given that you have just 24 hours at your disposal?

Could you as a back end deveoper learn UI framework in just 24 hours and could be competetive with those poeple who ad two years of experience to claim?

Could you finish reading a bulky book of fiction (may be LOTR) in just 24 hours?

Could you get yourself into a new branch of science, reinvent yourself and then come out virtuous even if you are at 30+ years of age?

Could you give up everything you have earned so far, start from the scratch, and then lead a life of satisfaction without weining over youe decision?

JWT based security using Keyclock

diag2.png

Assumptions :

  1. The reader is aware of keycloak
  2. The reader knows how to configure users and clients in keycloak

What this is about:

  1. Just a CURL way to get a token and access a secured REST service.

 

Let us say you have the necessarily configured key-cloak service running at the port 8080 of your local-machine.

The curl command to get a token would be as in the below:

export TOKEN=`curl –data “grant_type=password&client_id=client1&username=useruser&password=<<THE PASSWORD>>” http://localhost:8080/auth/realms/narnia/protocol/openid-connect/token| jq -r .access_token`

 

The full response of the above command wold be like the below:

{
“access_token”: “ACCESS_TOKEN_GIBBERISH”,
“expires_in”: 300,
“refresh_expires_in”: 1800,
“refresh_token”: “REFRESH_TOKEN_GIBBERISH”,
“token_type”: “bearer”,
“not-before-policy”: 0,
“session_state”: “SESSION_STATE_GIBBERISH”
}

Once you have the token, you could use the token to access the secured web-service as in the below:

curl -H “Authorization: bearer $TOKEN” http://localhost:9090/products

 

Since the access_token is short lived (about 300 seconds in this case), when it is expired, the application needs to acquire a new access_token. They way to do that would be, through the fluffy animal known as refresh_token.

If I have my refresh_token stored in a variable called REFRESH_TOKEN, I would be able t get a new access_token with the command below:

export TOKEN=`curl –data “grant_type=refresh_token&client_id=client1&refresh_token=$REFRESH_TOKEN” http://localhost:8080/auth/realms/narnia/protocol/openid-connect/token`

 

This is good as we don’t have to send the username and password all over again. But what is not intuitive is the fact that a new refresh_token gets issued each time it has been used to get a new token 😦

 

 

Criminology notes – the very basics

Forensic Large

Cesare Lombroso: He believed that criminal behavior is inherited and he even went on to hypothesize certain physical qualities of criminals.

  1. Forward Jaw Projection – high testosterone
  2. Low slopping foreheads
  3. High Cheekbones – high testosterone
  4. Flattened or Upturned nose
  5. Large Chins – high testosterone
  6. Hawk-like noses
  7. Hard, shifty eyes – deep seated uneasiness
  8. Scanty beard
  9. Insensitive to pain.

Sigmund Freud: Freud felt that people with higher superegos, who suffer high level of guilt, commit crimes as a means to attract the punishment to relieve them of their guilt. Freud identified the principle of pleasure and stated people who do not legal ways of meeting satisfying their biological and unconscious urges commit crimes.

August Aichorn: He had identified three traits humans that could lead to criminal behavior. They are:

  1. The desire for swift and immediate gratification.
  2. Placing desire over the ability to have meaningful relation with others.
  3. A general lack of guilt over actions.

Albert Bandura: He postulated that when criminal behavior goes unpunished, that gets repeated.

Summary:

  1. Criminals tend to think and react in a different way right from their childhoods and driven by their impulses, self-centeredness and the emotions of fear and anger
  2. Criminals suffer no actual remorse although they seek sympathy
  3. The lesser-size of frontal lobe –the part of the brain that is responsible for decision making, emotional processing and purposeful behaviors- and/or amygdale –the seat of emotions- could spur cause criminal behavior.
  4. Psychopathic criminals tend to lack the capability to process the facial expressions such as fear and dread.
  5. Psychopathic criminals exhibit unnatural fearlessness, lack of anxiety over the future or the associated consequences.
  6. Criminals tend to have thinner and longer Corpus Callosum –the bridge that separates the right side from the left side. It also observed that the criminals tend to have hyperactive communication between the right and left hemispheres of their brain hence the confusion over the rational and irrational thoughts.

Cues to identify a psychopath in a natural setting:

  1. Shifty and secretive behavior.
  2. Emotional Predating: Some psychopaths will latch onto people’s emotions and destroy them from within.
  3. Parent Seeking: Some psychopaths make to feel like you have assumed a parental role and then use your care taking skills to expose your vulnerabilities and destroy you.
  4. Jekyll and Hyde characters.
  5. Facial and neck tattoos.
  6. Thirsty eyes.

Some characteristics of Psychopaths:

  1. Lack of Caring
  2. Shallow Emotions
  3. Lack of Responsibility
  4. Insincere Speech
  5. Overconfidence
  6. Narrowing of attention

 

Getting into Psychology

Psychology+boronia+stalbans+bundoora+hoppers

I did start this year wanting to venture into Psychology. Even started a book and left it at there. Bought some more but like a young girl, waiting for her Mr-right-guy, I had been waiting for the right-moment since then. But finally, the wait is over.

 

But this time, I am getting a chance to study the material like a student. I will have fellow students. I will have exams. I will a chance to compare myself to an actual student. I get to tutor or tutored by a student. But in the all, it’s not just Psychology but also Criminology. About brain in depression, how-brain-works and all. Great time to be alive is when you are learning something you love. Yay!!

Slovak

slovak_flag

Ahoj/čau = hello

Ako sa máš (formal)= How are you?

Ako sa máte (informal)= How are you?

Ďakujem, dobre! = Thanks, good.

Prosím = Please/You are welcome.

Prepáčte/prepáč/pardôn = sorry

Áno = yes

Nie = no

Nech sa páči = After you/voila.

Dobré ráno is Good morning but should be used only till 9:00 and then Dobrý deň. (this ráno thing is nutral).

Dobré Večer = This is something you could say till 19:00 and some how Večera means dinner. (This Večer thing is masculin)

Dobrú noc = Good night. (night is feminine).

Moje meno je Arun/Ja som Arun/volám sa Arun

Teši ma = encantado!

Ja som z India.

Týždeň is week and weekend is víkend.

Pondelok, Ulolok, Stred (it also means middle), Štvrtok, Piatok (Piatok sviatok), Sobota, nedeľa.

“Pomoc” is help and the way to ask for help would be “Pomoc, Prosim“. The same to do in a polite way would be “Môžete mi prosím promôct?

Pozor means be careful but Zákaz is something like verboten.

 

Jedlo is food and Nápoj (pl. Napoje) is drink. Donno what Pitic means.

Raňajky is breakfast, Obed is lunch and as already said, Večera is dinner.

Kava is coffee, Čaj is tea. Džús is Juice, Milieko is milk. Pivo is beer and Voda is water and as expected víno is wine. Pohar is glass and Fláša is bottle (flask).

Promím si pohar vody is A glass of water please.

 

  1. Jedna/Jeden
  2. Dva
  3. Try
  4. Štyri
  5. Pät
  6. Šest
  7. Sedem
  8. Osem
  9. Devät
  10. Desat

And then you get the numbers from 11 t0 19 by adding –nást. E.g. Jedenást, Dvanást…. Devätnást.

Need to know about 21, 22 from Warbit (Warbit means a very good friend in Slovak)

Sto is 100 and Tisíc is 1000. Oh… Číslo (pl. Čisler) is number.