This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| redis: | |
| image: 'docker.io/bitnami/redis:6.0-debian-10' | |
| environment: | |
| # ALLOW_EMPTY_PASSWORD is recommended only for development. | |
| - ALLOW_EMPTY_PASSWORD=yes | |
| - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL | |
| - REDIS_TLS_ENABLED=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //usr/bin/env jbang "$0" "$@" ; exit $? | |
| /** | |
| * Run this with `jbang -Dquarkus.container-image.build=true build quarkus.java` | |
| * and it builds a docker image. | |
| */ | |
| //DEPS io.quarkus:quarkus-redis-client:1.10.5.Final | |
| //DEPS io.quarkus:quarkus-resteasy-mutiny:1.10.5.Final | |
| //DEPS io.quarkus:quarkus-resteasy-jsonb:1.10.5.Final | |
| //JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //usr/bin/env jbang "$0" "$@" ; exit $? | |
| //DEPS io.vertx:vertx-core:3.9.5 | |
| //DEPS io.vertx:vertx-web:3.9.5 | |
| //DEPS io.vertx:vertx-rx-java:3.9.5 | |
| //DEPS io.vertx:vertx-rx-java2:3.9.5 | |
| //DEPS io.vertx:vertx-redis-client:3.9.5 | |
| import io.vertx.core.*; | |
| import io.vertx.redis.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LimitFilter implements Filter { | |
| private int limit = 5; | |
| private int count; | |
| private Object lock = new Object(); | |
| public void doFilter(ServletRequest request, ServletResponse response, | |
| FilterChain chain) throws IOException, ServletException { | |
| try { | |
| boolean ok; | |
| synchronized (lock) { |