Skip to content

Instantly share code, notes, and snippets.

Niko Köbler dasniko

Block or report user

Report or block dasniko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dasniko
dasniko / docker-compose.yml
Last active Mar 20, 2019
keycloak cluster
View docker-compose.yml
version: "3.1"
services:
postgres:
image: postgres:10
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
kc1:
image: quay.io/keycloak/keycloak:5.0.0
@dasniko
dasniko / install.txt
Last active Mar 3, 2018
AWS Cloud9 EC2 install tools
View install.txt
// the AWS ec2 instance for cloud9 doesn't come with maven installed, so you need to do this my your own:
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
// unfortunately, it also comes with java version 7, so we need to install java 8 in order to be able to use it.
sudo yum install java-1.8.0-openjdk-devel
// additionally, we must set the right version for usage. uninstalling java 7 is not good, b/c it also will uninstall the above installed maven..
sudo update-alternatives --config java
@dasniko
dasniko / example.java
Created Nov 27, 2017
Create AuthzClient with Spring Boot Adapter
View example.java
@Bean
public AuthzClient authzClient(KeycloakSpringBootProperties kcProperties) {
Configuration configuration = new Configuration(
kcProperties.getAuthServerUrl(), kcProperties.getRealm(),
kcProperties.getResource(), kcProperties.getCredentials(), null);
return AuthzClient.create(configuration);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am dasniko on github.
  • I am dasniko (https://keybase.io/dasniko) on keybase.
  • I have a public key ASAIPZokcnTYoxb9pRpue-YRXawuvDpwpX7mc_Qp_6gLuQo

To claim this, I am signing this object:

@dasniko
dasniko / angular2.adoc
Last active Jan 22, 2017
Angular2 Links and Resources
View angular2.adoc
@dasniko
dasniko / tools.md
Last active Oct 17, 2016
My favourite JavaScript tools
View tools.md

My favourite JavaScript tools

This list is subject to change at any time, just as tools an my personal view changes.
Additionally, these are just my the ones I prefer, does not mean that I don't know nor like others!

Programming Languages

  • JavaScript in ECMAScript 2015 (ES6) or higher
    • ES5 only if really needed, as you always can use Babel
  • TypeScript
@dasniko
dasniko / nashorn-polyfill.js
Last active May 28, 2018
necessary JavaScript polyfills for working with Nashorn JS-engine
View nashorn-polyfill.js
var global = this;
var window = this;
var process = {env: {}};
var console = {};
console.debug = print;
console.warn = print;
console.log = print;
View node-async-redis.js
var http = require("http"),
redis = require("redis");
var redisClient = redis.createClient(6379, "127.0.0.1", {});
var TTL = 300;
var server = http.createServer(function(request, response) {
var headers = {"Content-Type": "text/plain"};
if (request.method.toUpperCase() !== "POST") {
response.writeHead(405, headers);
@dasniko
dasniko / FibonacciBenchmark.java
Created Nov 19, 2014
Fibonacci & Array/List Benchmark (Java)
View FibonacciBenchmark.java
package de.nko.benchmark;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author Niko Koebler, http://www.n-k.de, @dasniko
*
*/
@dasniko
dasniko / fib.js
Created Nov 19, 2014
Fibonacci/Array Benchmark Test (JavaScript)
View fib.js
var fibonacci = function() {
var i;
var fib = [];
fib[0] = 1;
fib[1] = 1;
for(i = 2; i <= 100; i++) {
fib[i] = fib[i-2] + fib[i-1];
}
fib;
};
You can’t perform that action at this time.