Skip to content

Instantly share code, notes, and snippets.

@JurrianFahner
JurrianFahner / reproduction-issue-vue.md
Last active March 24, 2024 16:37
Reproduce symlink issue for vite
  1. create base folder

    cd $env:TEMP
    mkdir without-symlink-dir-vue-1231
    cd without-symlink-dir-vue-1231
  2. bootstrap vite vanilla project

npm create vite@latest my-app -- --template vanilla

@JurrianFahner
JurrianFahner / Readme.md
Last active February 26, 2024 07:03
Generate javadoc

Please find below an example pom.xml. To generate the javadoc the following command needs to be run:

mvn javadoc:javadoc

The documentation for the maven-javadoc-plugin can be found here.

#Requires -Version 3.0
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM (PS Remoting) configuration and makes
# the necessary changes to allow Ansible to connect, authenticate and
# execute PowerShell commands.
#
# All events are logged to the Windows EventLog, useful for unattended runs.
@JurrianFahner
JurrianFahner / java-eol.md
Created June 11, 2023 14:32
Java LTS versions and years of support

LTS java

version build version release date end of life total years of support
7 1.7.0_80 2011-07-11 2021-07-31 10 years
8 8.0.372 2014-03-18 2023-12-31 9 years and 9 month
11 11.0.19+7 2018-09-25 2026-09-30 8 years
17 17.0.7+7 2021-09-14 2029-09-30 8 years
21 21-ea+26-2328 2023-09-15 2031-09-30 8 years
@JurrianFahner
JurrianFahner / docker-wrapper.ps1
Created April 26, 2023 15:35
A wrapper for docker, when it is run in wsl.
function docker()
{
$allArgs = $PsBoundParameters.Values + $args
& wsl docker $allArgs
}
for i in /etc/update-motd.d/*; do if [ "$i" != "/etc/update-motd.d/98-fsck-at-reboot" ]; then $i; fi; done
@JurrianFahner
JurrianFahner / generate-folders-for-advent-of-code.ps1
Created November 29, 2022 21:30
generate folders for advent of code
# creates all directories for advent of code in the following format:
# day01
# day01
# ...
# day25
 
for ($i = 1; $i -le 25; $i++)
{
$daystr = "day" + $i.ToString("00")
cargo new $daystr # cargo new is bootstrapping a rust project, example: cargo new day01
git init --initial-branch=main
@JurrianFahner
JurrianFahner / CVETester.java
Last active June 7, 2022 21:43
Test whether your java version is safe for CVE-2022-21449
import java.security.*;
public class CVETester {
public static void main(String... args) throws Exception {
var keys = KeyPairGenerator.getInstance("EC").generateKeyPair();
var blankSignature = new byte[64];
var sig = Signature.getInstance("SHA256WithECDSAInP1363Format");
sig.initVerify(keys.getPublic());
sig.update("Some random text to be encrypted".getBytes());
@JurrianFahner
JurrianFahner / switch-java.ps1
Created May 1, 2021 09:52
Java switch script for powerhsell
param($java_version)
$java_install_dir = switch($java_version)
{
8 {"C:\Program Files\Zulu\zulu-8"}
15 {"C:\Program Files\Zulu\zulu-15"}
default {"unknown"}
}
if ($java_install_dir -ne "unknown") {
$old_path=(Get-ChildItem env:Path).value