Skip to content

Instantly share code, notes, and snippets.

@amaslenn
amaslenn / UCX package
Last active October 24, 2017 09:29
Spec file and SRPM for UCX
See attached files.
@amaslenn
amaslenn / .gitlab-ci.yml
Last active November 22, 2018 12:08
GitLab CI with deploy assets to GitHub Releases
build:
only:
- tags
script:
- 'export upload_url=$(curl -s -H "Authorization: token $github_token" "https://api.github.com/repos/openucx/ucx/releases" | python -c "import sys,os,json; d=json.load(sys.stdin); tag=os.environ.get(\"CI_COMMIT_TAG\"); rel = [r for r in d if r[\"tag_name\"] == tag]; url = rel[0][\"upload_url\"] if rel else \"\"; print url" | grep -oP "https\S+assets")'
- echo $upload_url
- 'export tar_name=$(ls *.tar.gz)'
- echo $tar_name
- 'curl -s -H "Authorization: token $github_token" -H "Content-Type: application/zip" --data-binary @"$tar_name" "${upload_url}?name=${tar_name}&label=${tar_name}"'
@amaslenn
amaslenn / setup-node_exporter-systemd.sh
Last active March 5, 2020 06:02
Setup a node_exporter systemd service
#!/bin/bash -eEl
function node_exporter_name() {
arch=$(uname -m)
if [ "${arch}" = "aarch64" ]; then
arch="arm64"
elif [ "${arch}" = "x86_64" ]; then
arch="amd64"
fi
@amaslenn
amaslenn / run-many.sh
Last active April 10, 2020 04:49
Measure parallel runs tims
#!/bin/bash -eE
taskset -c 0-1 ./run-one.sh ucx &
taskset -c 2-3 ./run-one.sh ucx1 &
taskset -c 4-5 ./run-one.sh ucx2 &
taskset -c 6-7 ./run-one.sh ucx3 &
wait