Skip to content

Instantly share code, notes, and snippets.

@shikendon
shikendon / build-mmproxy.sh
Last active January 31, 2019 20:44
Build mmproxy on CentOS 7
#!/usr/bin/env bash
set -e
cat <<'END' | sudo tee /etc/yum.repos.d/epel-alonid-llvm.repo
[epel-alonid-llvm-3.9.0]
name=Copr repo for llvm-3.9.0 owned by alonid
baseurl=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/epel-7-$basearch/
type=rpm-md
enabled=0
gpgkey=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/pubkey.gpg
@nickjacob
nickjacob / systemd-prblm.service
Last active March 17, 2023 16:11
execute arbitrary bash code/variable substitution in systemd units
[Unit]
Description=Demonstrate Bash
[Service]
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/echo "2 + 2 = ${MYVAR}"