Skip to content

Instantly share code, notes, and snippets.

View gayashanbc's full-sized avatar
:octocat:
Nothing is true, everything is permitted...

Gayashan Bombuwala gayashanbc

:octocat:
Nothing is true, everything is permitted...
View GitHub Profile
@gayashanbc
gayashanbc / MakePowerShellRememberSSHPassphrase.md
Created May 13, 2022 09:05 — forked from danieldogeanu/MakePowerShellRememberSSHPassphrase.md
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@gayashanbc
gayashanbc / web.xml
Created August 20, 2020 14:28
web.xml of SampleApp
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
@gayashanbc
gayashanbc / sampleApp.properties
Created August 20, 2020 14:26
Property Configs for SampleApp
EnableSAML2SSOLogin=true
#Url to do send SAML2 SSO AuthnRequest
SAML2SSOURL=samlsso
#URIs to skip SSOAgentFilter; comma separated values
SkipURIs=
IndexPage=/SampleApp/index.html
@gayashanbc
gayashanbc / hazelcast.xml
Created November 18, 2019 05:52
Hazelcast config for AWS ECS
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.12.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<network>
<interfaces enabled="true">
<interface>10.0.*.*</interface>
</interfaces>
<join>
<multicast enabled="false"/>
@gayashanbc
gayashanbc / active-sessions-limit-handler-4.js
Created September 26, 2019 14:35
getUserSessions(user) demo
var sessions = getUserSessions(user);
for(var key in sessions) {
Log.info(sessions[key].userAgent.browser); // Print the web browser of each user session
}
@gayashanbc
gayashanbc / active-sessions-limit-handler-3.js
Created September 26, 2019 13:32
Limiting active user sessions using adaptive JS functions
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
function onLoginRequest(context) {
@gayashanbc
gayashanbc / active-sessions-limit-handler-2.js
Created September 26, 2019 13:25
Configuring active-sessions-limit-handler variables through deployment.toml file
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
function onLoginRequest(context) {
@gayashanbc
gayashanbc / deployment.toml
Created September 26, 2019 13:19
Configuring the MaxSessionCount variable in deployment.toml file
authentication.authenticator.session_handler.parameters.max_session_count = "2"
@gayashanbc
gayashanbc / active-sessions-limit-handler-1.js
Created September 26, 2019 13:04
Adaptive JS Script for Active Sessions Limit Handler
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
@gayashanbc
gayashanbc / starUML.md
Created November 23, 2018 18:41 — forked from trandaison/starUML.md
Get full version of StarUML

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**