Skip to content

Instantly share code, notes, and snippets.

@akoserwal
akoserwal / index.html
Created July 15, 2018 18:17
RxJS 5 Operators // source http://jsbin.com/daquqiq
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>RxJS 5 Operators</title>
<script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.umd.js"></script>
</head>
<body>
@akoserwal
akoserwal / jsbin.daquqiq.js
Last active July 15, 2018 18:20
Observer pattern // source http://jsbin.com/daquqiq
console.clear();
var Subject = function() {
var self = this;
self.observers = [];
return {
subscribe: function(observer) {
self.observers.push(observer);
},
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[iterator & observer]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@akoserwal
akoserwal / lesson-1.md
Last active February 7, 2019 21:27
Ch1-remotes

Git-in-Real: Lesson 1

Remotes: Adding a remote location to where you can publish your repository. You can add mutiple remote location.

To Check remote locations

git remote -v

Ouput:

@akoserwal
akoserwal / lesson-2.md
Last active February 8, 2019 16:45
lesson-2.md

Git-in-Real: Lesson 2

Amend: Rewriting history

While writing this lesson I commited this file and forget to add a file. Also my commit message is not correct. As you have already checked-out this branch. It's your responsibility to fix my lesson.

Question in your mind! how?

git commit --amend

@akoserwal
akoserwal / lesson-3.md
Created February 8, 2019 18:34
lesson-3

Git-in-Real: Lesson 3

Merge-Conflicts

You will encounter conflict when working within in a team or even working on your own project.

Let's create a conflicting situation and confuse the git system.

git checkout Ch3-conflict

{
"movies": [ "Iron Man (2008)",
"The Incredible Hulk (2008)",
"Iron Man 2 (2010)",
"Thor (2011)",
"Captain America: The First Avenger (2011)",
"Marvel's The Avengers (2012)",
"Iron Man 3 (2013)",
"Thor: The Dark World (2013)",
"Captain America: The Winter Soldier (2014)",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akoserwal
akoserwal / main.js
Last active January 31, 2024 12:52
vue-integration-keycloak
let initOptions = {
url: 'https://0.0.0.0:8445/auth', realm: 'keycloak-demo', clientId: 'vue-test-app', onLoad:'login-required'
}
let keycloak = Keycloak(initOptions);
keycloak.init({ onLoad: initOptions.onLoad }).success((auth) =>{
if(!auth) {
window.location.reload();
@akoserwal
akoserwal / main.ts
Created May 17, 2019 04:34
angular-keycloak-integration
//keycloak init options
let initOptions = {
url: 'https://0.0.0.0:8445/auth', realm: 'keycloak-demo', clientId: 'angular-test-app'
}
let keycloak = Keycloak(initOptions);
keycloak.init({ onLoad: "login-required" }).success((auth) => {