Skip to content

Instantly share code, notes, and snippets.

mkdir -p /opt/cisco/anyconnect/lib-hack/ext
cd /opt/cisco/anyconnect/lib-hack/ext
wget -c https://archive.archlinux.org/packages/l/libxml2/libxml2-2.11.5-1-x86_64.pkg.tar.zst
wget -c https://archive.archlinux.org/packages/g/glib2/glib2-2.78.0-3-x86_64.pkg.tar.zst
wget -c https://archive.archlinux.org/packages/i/icu/icu-73.2-2-x86_64.pkg.tar.zst
tar --use-compress-program=unzstd -xvf libxml2-2.11.5-1-x86_64.pkg.tar.zst usr/lib
tar --use-compress-program=unzstd -xvf glib2-2.78.0-3-x86_64.pkg.tar.zst usr/lib
tar --use-compress-program=unzstd -xvf icu-73.2-2-x86_64.pkg.tar.zst usr/lib
cp -av usr/lib/lib* /opt/cisco/anyconnect/lib-hack
@danielkec
danielkec / Dockerfile.sout-dl
Created November 2, 2023 14:40
7922-reproducer
FROM container-registry.oracle.com/java/openjdk:21.0.1
ENV VEGETA_VERSION 12.8.4
RUN dnf -y update && dnf -y install wget curl
RUN wget -q "https://github.com/tsenart/vegeta/releases/download/v${VEGETA_VERSION}/vegeta_${VEGETA_VERSION}_linux_amd64.tar.gz" -O /tmp/vegeta.tar.gz \
&& cd /bin \
&& tar xzf /tmp/vegeta.tar.gz \
@danielkec
danielkec / LazyVIM.md
Last active October 22, 2024 03:25
LazyVIM

Default shortcuts

Ctrl+h        select file tree
Ctrl+l        select file editor
Shift+h       left editor tab
Shift+l       right editor tab
Alt+j         move current line up
Alt+k         move current line down
double space  filename search(telescope) - `Ctrl+d` and `Ctrl+u` to scroll preview
@danielkec
danielkec / wireshark.md
Created September 22, 2023 12:52
Wireshark

Dark mode

  1. sudo apt install adwaita-qt
  2. wireshark -style Adwaita-Dark
  3. sudo sed -i "/Exec=/c\Exec=wireshark -style Adwaita-Dark" /usr/share/applications/org.wireshark.Wireshark.desktop

No Sudo

  1. sudo dpkg-reconfigure wireshark-common
  2. sudo adduser wireshark
@danielkec
danielkec / helidon301-rsmsg30-Tck.log
Created September 1, 2022 18:49
Helidon 3.0.1 TCK Results
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: linux
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 5.15
[INFO] os.detected.version.major: 5
[INFO] os.detected.version.minor: 15
[INFO] os.detected.release: ubuntu
@danielkec
danielkec / LargeUpload.java
Created August 2, 2022 11:33
Upload stream
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.Duration;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
import io.helidon.common.configurable.ThreadPoolSupplier;
import io.helidon.common.http.DataChunk;
server:
port: 8080
tls.private-key.keystore:
resource.resource-path: server.p12
passphrase: password
@ServerEndpoint("/ws/echo")
public class EchoEndpoint {
@OnMessage
public void onMessage(Session session, String message) throws Exception {
session.getBasicRemote().sendText("Did you send " + message + "?");
}
}
public static void main(String[] args) {
WebServer.builder(
Routing.builder()
.register("/ws", TyrusSupport.builder()
.register(ServerEndpointConfig.Builder.create(WsEndpoint.class, "/echo").build())
.build()
)
)
.port(8080)
.tls(WebServerTls.builder()