Skip to content

Instantly share code, notes, and snippets.

@pkunc
pkunc / magic-button.md
Last active October 12, 2023 12:38
Magic Button for HCL Notes

Magic Button for HCL Notes

Add the button to a toolbar in your HCL Notes client.

  • Go to File - Preferences - Toolbar Preferences.

  • Select Customize, click on New - Button...

  • Copy-paste the following text into the Formula field:

@pkunc
pkunc / 0-check-cpu-type.md
Last active July 31, 2023 15:41
How to check the CPU type

How to check the CPU type

Some applications require specific architecture levels of x86-64 processor: x86-64-v2, x86-64-v3 or x86-64-v4.

These scripts can tell which x86-64 CPU level you are running.

Note: Useful for virtualization/emulation platforms, where you can set CPU type or specific CPU flags.

@pkunc
pkunc / build-domino-container.md
Last active July 31, 2023 15:26
How to build a Domino container

How to build a Domino container

Commands for building a container image for HCL Domino, using a comunity script.

First, set the software installers location:

export SOFTWARE_DIR=~/software

Build a Domino image with the most used add-ons:

@pkunc
pkunc / ansible-extract-domain.md
Last active February 20, 2023 09:09
Ansible: Extract domain from the server name

Ansible: Extract domain from a server name

- debug:
    msg: 'domain only: {{ ("server.domain.com" | split(".", 1))[1] }}'

Output:

@pkunc
pkunc / get-ip-linux.md
Last active March 16, 2022 09:35
Get IP address in Linux

Get IP address in Linux

Several ways how to get an IP address only, using a Linux command.

ip -f inet addr show eth0 | grep -Po 'inet \K[\d.]+'
ip -4 addr show eth0 | grep -Po 'inet \K[\d.]+'
@pkunc
pkunc / ansible-prefix-suffix.md
Last active September 14, 2024 21:31
Ansible: Add a prefix or suffix to all items of a list

Ansible: Add a prefix or suffix to all items of a list

Add prefix to a list items

- debug:
    var: result
  vars:
    prefix: foo
    a_list: [ "bar", "bat", "baz" ]
 result: "{{ [prefix] | product(a_list) | map('join') | list }}"
@pkunc
pkunc / pythonCA.sh
Created February 20, 2022 13:36
Set environment for Python CA certificates
CERT_PATH=$(python3 -m certifi)
export SSL_CERT_FILE=${CERT_PATH}
export REQUESTS_CA_BUNDLE=${CERT_PATH}