Skip to content

Instantly share code, notes, and snippets.

View rodrik's full-sized avatar

Rodrigo Ribeiro rodrik

View GitHub Profile
package br.com.gcargo.manager.web.controller.util;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
import com.lowagie.text.pdf.Barcode128;
@rodrik
rodrik / pom.xml
Created March 22, 2016 19:43
Sample pom.xml file to enable spring-boot on WAS 8.5.5 running jdk1.6
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.rodrik</groupId>
<artifactId>spring-boot-was</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java.version>1.6</java.version>
</properties>
#!/bin/bash
# Install Windows Subsystem for Linux
# Install Ubuntu from the Windows Store
# Install Hyper
# https://hyper.is/
# Edit the config
# Find the shell line and change it to shell: 'C:\\Windows\\System32\\bash.exe'
# Add Inconsolata to the fonts
@rodrik
rodrik / HashCodeTest.java
Created July 12, 2018 05:08
Commons vs Native
package io.github.rodrik.commons;
import java.time.LocalDate;
import java.util.Arrays;
import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.junit.Test;
import org.junit.runner.RunWith;
choco install cmdermini -y
choco install git -y
choco install putty -y
choco install winscp -y
choco install awscli -y
choco install jdk11 -y
choco install jdk8 -y
choco install maven -y
choco install python -y

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Manual Configuration

Set Interface Metrics

@rodrik
rodrik / ttk-quartz-engine-topics.yaml
Created October 8, 2024 03:26
ttk-quartz-engine topics
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: trigger-system-job
namespace: kafka
labels:
strimzi.io/cluster: my-cluster
spec:
partitions: 3
replicas: 1