Skip to content

Instantly share code, notes, and snippets.

Biju Kunjummen bijukunjummen

Block or report user

Report or block bijukunjummen

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
@bijukunjummen
bijukunjummen / GatewayRoutes.java
Created Mar 20, 2018
Sample Spring Cloud Gateway Routes
View GatewayRoutes.java
package gateway.sample;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.TimeUnit;
@Configuration
@bijukunjummen
bijukunjummen / generate_uaa_keypair.sh
Created Feb 11, 2018
Generate a Signing Key and Verification Key for Cloud Foundry UAA
View generate_uaa_keypair.sh
#!/bin/bash
openssl genrsa -out privkey.pem 2048
openssl rsa -pubout -in privkey.pem -out pubkey.pem
SIGNING_KEY=$(cat privkey.pem)
VERIFICATION_KEY=$(cat pubkey.pem)
JWT_SIGNING_KEYS=$(cat <<EOF
jwt:
token:
View VirtualTimeTestExplicit.kt
package sample
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import reactor.core.publisher.Flux
import reactor.test.scheduler.VirtualTimeScheduler
import java.time.Duration
import java.util.concurrent.CountDownLatch
View keybase.md

Keybase proof

I hereby claim:

  • I am bijukunjummen on github.
  • I am biju (https://keybase.io/biju) on keybase.
  • I have a public key whose fingerprint is B421 3F7A 7420 4272 466F A297 76CC 4693 D0E9 C8A4

To claim this, I am signing this object:

View bumpme
Fri May 27 21:50:07 UTC 2016
@bijukunjummen
bijukunjummen / EnableSomeBeansSelector.java
Created Apr 8, 2015
Spring Enable Annotation with Selectors
View EnableSomeBeansSelector.java
package enableannot.selector;
import org.springframework.context.annotation.Import;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
View TestEnableAnnotations.java
package enableannot.simple;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
View waterbuckets.scala
package bucket
case class Pouring(capacity: Vector[Int], initialState: Vector[Int]){
type State = Vector[Int]
trait Move {
def change(state: State): State
}
case class Pour(from: Int, to: Int) extends Move {
@bijukunjummen
bijukunjummen / RandomStreamTest
Created Dec 26, 2013
java.util.Random in Java 8
View RandomStreamTest
package lambda;
import org.junit.Test;
import java.util.*;
import java.util.stream.*;
public class RandomStreamTest {
@Test
@bijukunjummen
bijukunjummen / pagination.tag
Last active Nov 24, 2016
A tag library which uses Spring data page object to show bootstrap compatible pager
View pagination.tag
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ attribute name="thispage" type="org.springframework.data.domain.Page" required="true" rtexprvalue="true" description="The current Page"%>
<c:set var="pageNumber" value="${thispage.number}" />
<c:set var="maxPages" value="${thispage.totalPages}" />
<c:set var="size" value="${thispage.size}" />
<div class="span12">
You can’t perform that action at this time.