Skip to content

Instantly share code, notes, and snippets.

View torrespro's full-sized avatar

Andrés Torres torrespro

View GitHub Profile

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

@torrespro
torrespro / Dockerfile
Created December 28, 2021 12:50
A #docker container that runs #Java webserver ('jwebserver' command line tool in #jdk18) to serve javadoc. Note the use of #jlink tool to create minimal JRE with just the jdk.httpserver module + its transitive dependencies. Credit to: https://twitter.com/sundararajan_a/status/1473465961818701824
FROM openjdk:18-jdk-oraclelinux8 as build
#minimum jre image for webserver
RUN jlink --add-modules jdk.httpserver --output java_http
RUN curl \
https://download.oracle.com/otn_software/java/jdk/17.0.1+12/2a2082e5a09d4267845be086888add4f/jdk-17.0.1_doc-all.zip \
--output docs.zip && \
jar xvf docs.zip
package designpatterns;
import java.lang.reflect.Method;
import org.junit.jupiter.api.DisplayNameGenerator;
class ReplaceCamelCase extends DisplayNameGenerator.Standard {
@Override
public String generateDisplayNameForClass(Class<?> testClass) {
return this.replaceCapitals(super.generateDisplayNameForClass(testClass));
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<configuration>
<release>15</release>
</configuration>
</execution>
</executions>
CustomResourceDefinition crd = defaultClient.customResourceDefinitions()
.list()
.getItems()
.stream()
.filter(d -> "pizzas.mykubernetes.acme.org".equals(d.getMetadata().getName()))
.findAny()
.orElseThrow(() -> new RuntimeException("Deployment error: Custom resource definition mykubernetes.acme.org/v1beta2 not found."));
version: "3.7"
# https://docs.docker.com/compose/compose-file/
x-common-variables: &common-variables
SIG_SECRET_KEY: JWTSecretKeyDontUseInProduction!
EXTERNAL_SIG_SECRET_KEY: JWTSecretKeyDontUseInProduction!
EXTERNAL_ENC_SECRET_KEY: JWTEncKeyDontUseInProduction666!
eureka.client.serviceUrl.defaultZone: http://registry:8080/eureka
eureka.instance.non-secure-port: 8080
management.endpoints.web.exposure.include: info,health,beans,bindings
### Keybase proof
I hereby claim:
* I am torrespro on github.
* I am torres (https://keybase.io/torres) on keybase.
* I have a public key ASDzytqU1F_rEVSIOC58fEmzPuYO5zNP11ox4S1yXSZJggo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am torrespro on github.
  • I am torres (https://keybase.io/torres) on keybase.
  • I have a public key whose fingerprint is B38A BCF7 1117 9204 98E4 5467 94B6 0CE1 2AEC E2E5

To claim this, I am signing this object: