Skip to content

Instantly share code, notes, and snippets.

View jjangsam's full-sized avatar

Bryan Jang Kim jjangsam

  • Los Angeles, CA
View GitHub Profile
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
//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
//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.*;
@jjangsam
jjangsam / .gitlab-ci.yml
Created February 20, 2020 02:10 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# 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.
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) {