Skip to content

Instantly share code, notes, and snippets.

View slachiewicz's full-sized avatar

Sylwester Lachiewicz slachiewicz

View GitHub Profile
@ngxson
ngxson / FAQ.md
Last active February 27, 2025 00:51
convert ARM NEON to WASM SIMD prompt

Why did you do this?

Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...

What is your setup?

Just chat.deepseek.com (cost = free) with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?

@gnodet
gnodet / Maven4Migration.java
Created January 8, 2025 20:44
JBang script to startup migrating a plugin to the Maven 4 API
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS com.github.javaparser:javaparser-core:3.25.7
//DEPS org.apache.commons:commons-lang3:3.14.0
//DEPS info.picocli:picocli:4.7.5
//DEPS org.dom4j:dom4j:2.1.4
//JAVA 17
import com.github.javaparser.JavaParser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.ImportDeclaration;
@gnodet
gnodet / plugin-migration.md
Last active January 9, 2025 00:48
Migrating a plugin to Maven 4

Script

The below rules and steps are mostly automated by simply running the Maven4Migration.java jbang script in the plugin directory.

Rules

The rules are quite simple

  • the plugin can only depend on org.apache.maven:maven-api-* artifacts (no any other maven related artifacts) at compile time
  • avoid plexus artifacts at compile time
  • mojo annotations are now in org.apache.maven.api.plugin.annotations package
from uuid import uuid4
from argparse import ArgumentParser
from datetime import datetime, timedelta
# avro stuff
from avro.datafile import DataFileWriter
from avro.io import DatumWriter, BinaryEncoder
# kafka stuff
from confluent_kafka import Producer, Consumer
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active December 5, 2024 17:40
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@int128
int128 / README.md
Last active August 31, 2024 16:28
Example of Envoy TCP Proxy
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active January 22, 2025 06:47
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@milindchawre
milindchawre / cka-ckad-bookmarks
Created December 14, 2020 10:57
Bookmarks for cka and ckad exam
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1604897638" LAST_MODIFIED="0" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>
@gabibeyer
gabibeyer / podman_kata.sh
Last active September 6, 2020 21:10
podman with kata-runtime
#!/bin/bash
# running kata-runtime with podman on Fedora 28
# I used ccloudvm for my dev system (this is not required)
ccloudvm create --name podman --mem 4096 --cpus 2 fedora28
ccloudvm connect podman
# update system and install podman
sudo yum update
sudo yum install podman