Skip to content

Instantly share code, notes, and snippets.

View rotty3000's full-sized avatar

Raymond Augé rotty3000

View GitHub Profile
@rotty3000
rotty3000 / env.sh
Created March 28, 2026 15:30
Ollama Environment Variables
# Ollama Environment Variables
# Search: https://deepwiki.com/ollama/ollama
# Query: How do I find out if I should set and the value for the environment variable <env_var>
CUDA_VISIBLE_DEVICES= # (comma-separated) You should set CUDA_VISIBLE_DEVICES when you have multiple NVIDIA GPUs in your system and want to control which specific GPUs Ollama uses for inference.
GGML_VK_VISIBLE_DEVICES= # (comma-separated numeric IDs) You should set GGML_VK_VISIBLE_DEVICES when you have multiple Vulkan-compatible GPUs and want to control which specific GPUs Ollama uses for inference, or when you want to disable Vulkan GPU support entirely.
GPU_DEVICE_ORDINAL= # (comma-separated numeric IDs) You should set GPU_DEVICE_ORDINAL when you have multiple AMD GPUs in your system and want to control which specific AMD GPUs are visible to Ollama, similar to other AMD GPU visibility variables.
HIP_VISIBLE_DEVICES= # (comma-separated numeric IDs) You should set HIP_VISIBLE_DEVICES when you have multiple AMD GPUs in your system and w
@rotty3000
rotty3000 / expected-output.log
Created April 8, 2025 15:59
Client Extension ENV contract in Go
LIFERAY_ROUTES_DXP Configuration:
Domains: [localhost]
Main Domain: localhost
Server Protocol: http
LIFERAY_ROUTES_CLIENT_EXTENSION Configuration for 'liferay-sample-etc-spring-boot-oauth-application-user-agent':
Headless Server Audience:
Headless Server Client ID:
Headless Server Client Secret:
Headless Server Scopes:
Authorization URI: /o/oauth2/authorize
@rotty3000
rotty3000 / expected-output.log
Last active April 8, 2025 15:47
Client Extension ENV contract in Python
DXP Domains:
- localhost
DXP Main Domain: localhost
DXP Server Protocol: http
OAuth 2.0 Configuration for 'liferay-sample-etc-spring-boot-oauth-application-user-agent':
headless_server_audience: None
headless_server_client_id: None
@rotty3000
rotty3000 / Dockerfile
Created September 26, 2022 13:45
Add Azul Zulu Debian repo without warnings and using `signed-by` pattern.
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9' | gpg --dearmor -o /etc/apt/keyrings/azul.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" \
| tee /etc/apt/sources.list.d/zulu-openjdk.list > /dev/null && \
apt-get update && \
apt-get install -y zulu11-jdk && \
apt-get clean
@rotty3000
rotty3000 / validate-custom-element.sh
Last active March 11, 2022 19:25
Validate Web Component Custom Element name with bash and grep
#!/bin/bash
# Derived from https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
PCENCHAR=[-.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{203F}-\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2F2F}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}]
CUSTOM_ELEMENT_NAME_REGEX=^[a-z]${PCENCHAR}*-${PCENCHAR}*$
if ! (echo "$1" | grep -q -P $CUSTOM_ELEMENT_NAME_REGEX); then
echo "invalid custom element name '$1'"
fi
@rotty3000
rotty3000 / example.java
Last active December 18, 2021 16:08
jdeps as ToolProvider exception on reuse
/*
The jdeps args used can be:
*/
jdeps0(
"--ignore-missing-deps",
"--no-recursive",
"--print-module-deps",
"--multi-release",
System.getProperty("java.specification.version"),
file.getAbsolutePath());
@rotty3000
rotty3000 / script.java
Created December 11, 2021 21:04
JShell Script SEBANG line
//usr/bin/env jshell <(for V in "$@";do A+="\"$V\",";done;echo "String[] args = {$A}") "$0"; exit $?
Stream.of(
args
).map(
"ARG: "::concat
).forEach(
System.out::println
);
@rotty3000
rotty3000 / command.bash
Last active November 22, 2021 16:57
jaxb-api jdeps
jdeps -verbose:class --multi-release 17 \
--module-path ~/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar \
~/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar
@rotty3000
rotty3000 / gist:a68c8ea494f4c1b2e304822dc8a72a66
Created October 1, 2018 13:59
diff asm 7.0-BETA vs. 6.2.1
~]$ baseline -v ~/.m2/repository/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.jar ~/.m2/repository/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar
===============================================================
org.objectweb.asm 7.0.0.beta-6.2.1
===============================================================
Package Delta New Old Suggest If Prov.
org.objectweb.asm MAJOR 7.0.0.beta 6.2.1 ok -
MAJ class org.objectweb.asm.ClassVisitor
+ method visitNestHost(java.lang.String)
+ return void
- method visitNestHostExperimental(java.lang.String)
@rotty3000
rotty3000 / build.gradle
Created April 24, 2017 19:27
gradle flatten while copy
/*
Where:
origin/
├── foo
│   └── fum.txt
├── bar
│   └── other.txt
└── biz
   └── baf
   └── bop