ansible --version
ERROR: Ansible requires the locale encoding to be UTF-8; Detected None.
Hacked with explicit assignment of LC_ALL:
LC_ALL=C.UTF-8 ansible --version
ansible [core 2.14.1]
ansible --version
ERROR: Ansible requires the locale encoding to be UTF-8; Detected None.
Hacked with explicit assignment of LC_ALL:
LC_ALL=C.UTF-8 ansible --version
ansible [core 2.14.1]
# Run on a swarm manager node | |
- name: find container and node | |
shell: | | |
set -e | |
{% raw %} | |
task_id="$(docker stack ps gitlab --filter desired-state=running --format="{{.ID}}")" | |
# stdout_lines[0] | |
docker inspect $task_id --format="{{.Status.ContainerStatus.ContainerID}}" |
The controller is easy enough to configure in Emulation Station frontend, but once in a game, the buttons are not correct. A tuned configuration is required for use with mupen64 emulators.
$ dmesg
[194164.863158] usb 1-1: new low-speed USB device number 6 using xhci_hcd
[194165.007396] usb 1-1: New USB device found, idVendor=0079, idProduct=0006, bcdDevice= 1.09
[194165.007420] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[194165.007432] usb 1-1: Product: Generic USB Joystick
[194165.036270] input: Generic USB Joystick as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:0079:0006.0006/input/input28
import java.nio.charset.StandardCharsets | |
import org.apache.commons.io.IOUtils | |
// https://stackoverflow.com/questions/57107486/how-to-read-jenkins-credentials-at-folder-level | |
def folder = Jenkins.instance.getItems(com.cloudbees.hudson.plugins.folder.Folder).find({ | |
// TODO handle sub-folders as required | |
it.getFullName() == 'folder-name' | |
}) |
# This set of tasks rotates a swarm config by generating a config name. | |
# If input contents change, the hash changes, triggering a name change and restart of consuming service(s) | |
# Tasks should all `run_once` if multiple swarm managers are in play. | |
- hosts: swarm_manager | |
tasks: | |
- set_fact: | |
config_data: '{{ lookup("template", "templates/my-template.cfg") }}' | |
- name: create config |
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "$0 <password>" | |
exit | |
fi | |
checksum="$(printf '%s' "$1" | sha1sum | awk '{print $1}')" | |
prefix="$(printf '%.5s' "$checksum")" | |
suffix="$(printf "$checksum" | sed 's/^.\{5\}//')" |
import os | |
import subprocess | |
import sys | |
if 'VIRTUAL_ENV' not in os.environ: | |
os.environ['VIRTUAL_ENV'] = os.path.realpath('.venv') # Replace .venv with the virtual environment to load | |
virtual_python = os.environ['VIRTUAL_ENV'] + '/bin/python' | |
subprocess.call([virtual_python] + sys.argv) | |
sys.exit() |
import org.jenkinsci.plugins.workflow.actions.WarningAction | |
import org.jenkinsci.plugins.workflow.graph.FlowNode | |
import org.jenkinsci.plugins.workflow.job.WorkflowRun | |
import hudson.model.Result | |
/** | |
* Mark previous step unstable, without marking the whole build unstable | |
* | |
* This can be used to highlight inefficiencies or non-ideal usage of a pipeline, while permitting overall | |
* status (e.g. pull request checks) to return green/success. This will highlight the step and stage in |
#!/bin/sh | |
# This script applies a git commit cherry-pick style from one path to another. | |
# A patch is generated relative to the source folder, and reapplied on the | |
# destination folder. | |
# | |
# This is useful for promotion in infrastructure-as-code (IaC) implementations | |
# using folder-per-environment layouts. | |
# | |
# TODO: apply backlink to source commit in message, and potentially message |