Skip to content

Instantly share code, notes, and snippets.

# syntax=docker/dockerfile:1
ARG GRADLE_VERSION=8.7
ARG JDK_VERSION=17
ARG UBUNTU_CODENAME=jammy
ARG SOURCE_DIR=/home/jenkins
ARG UID=1000
ARG GID=1000
ARG APP_FAMILY=family
ARG APP_NAME=application
@ikorchynskyi
ikorchynskyi / wsl-exec-format-error.md
Last active April 19, 2024 13:09
WSL2 "Exec format error" issue

The issue is that enabling systemd somehow alters /proc/sys/fs/binfmt_misc/ The file (or filelike??) entry WSLInterop.conf goes missing.

I've re-written the answer here rather than just linking as the original reference thread is getting rather long and has dead links. The oneliner elimiates that problem.

The solution (from here) is to replace that file. Windows executable files start with the two letters MZ The following tells Linux what to do when trying to run files that start with those letters.

sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'
sudo systemctl restart systemd-binfmt
@ikorchynskyi
ikorchynskyi / github_bitbucket_multiple_ssh_keys.md
Created September 21, 2023 20:19 — forked from yinzara/github_bitbucket_multiple_ssh_keys.md
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@ikorchynskyi
ikorchynskyi / LICENSE
Created July 27, 2023 08:16 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
import java.io.IOException;
import java.io.OutputStream;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
@ikorchynskyi
ikorchynskyi / gist:087391aa7dd3eb3832c47f5d2d4a46b8
Created June 6, 2023 16:34
docker sbom ctm/data-interaction:runtime
$ docker sbom ctm/data-interaction:runtime
Syft v0.46.3
✔ Loaded image
✔ Parsed image
✔ Cataloged packages [222 packages]
NAME VERSION TYPE
HikariCP 5.0.1 java-archive
aajohan-comfortaa-fonts 3.001-2.el8 rpm
accessors-smart 2.4.9 java-archive
angus-activation 2.0.0 java-archive
@ikorchynskyi
ikorchynskyi / Dockerfile
Created June 1, 2023 13:27
Dockerfile example
# syntax=docker/dockerfile:1
ARG GRADLE_VERSION=8
ARG JDK_VERSION=17
ARG UBUNTU_CODENAME=jammy
ARG SOURCE_DIR=/home/jenkins
ARG UID=1000
ARG GID=1000
ARG APP_FAMILY=family
ARG APP_NAME=app
@ikorchynskyi
ikorchynskyi / 01.bash_shortcuts_v2.md
Created December 16, 2021 10:57 — forked from tuxfight3r/01.bash_shortcuts_v2.md
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@ikorchynskyi
ikorchynskyi / README.md
Created November 13, 2021 21:04 — forked from lenosi/README.md
MIUI bloatware

Get list of system apps on the device:

adb shell "echo 'apps:' && pm list packages -f | grep /system/app/ | sed 's/.*=/  - /'"

Remove application command

pm uninstall -k --user 0 app
@ikorchynskyi
ikorchynskyi / delete_all_object_versions.sh
Created August 9, 2021 12:20 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`