- Install qemu-user-static (
yay -S qemu-user-static
).- This might need you to install
pcre-static
and update PGP keys (follow the tips in the comments here).
- This might need you to install
- If not already present, install
systemd-binfmt
, the revamped version ofbinfmt-support
tools- Your system has to support transparent Qemu user emulation, but fortunately, that is mostly enabled once the steps here have been followed.
- Check the status of the
systemd-binfmt
unit (systemctl status systemd-binfmt
) and (re)start if needed (sudo systemctl restart systemd-binfmt
)- This unit has ARM support by default, but check the current documentation to make install it if needed
- Mount the root partition of the ARM system into a folder (for e.g.,
sudo mount /dev/sdb2 arm_mountpoint
) - Copy the QEMU ARM static binary (
/usr/bin/qemu-arm-static
on my distro) to the mounted root directory'susr/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.slaves.* | |
import hudson.model.* | |
for (aSlave in hudson.model.Hudson.instance.slaves) { | |
if (aSlave.name.indexOf("medium-rt-framework") == 0 && !aSlave.getComputer().isOnline()) { | |
aSlave.getComputer().setTemporarilyOffline(true, null) | |
aSlave.getComputer().doDoDelete() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interval_dict = OrderedDict([ | |
('hr', 3600*1000), | |
('min', 60*1000), | |
('sec', 1000), | |
('ms' , 1), | |
]) | |
def convert_to_ms(string): | |
interval_regex = re.compile( "^[<]?(?P<value>(\d\.)?[0-9]+) (?P<unit>({0}))".format("|".join(interval_dict.keys())) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get events -o json | jq '.items[] | .lastTimestamp + "," + .message' | tr -d '"' | awk -F',' '{cmd="date +\"%d/%b/%Y:%T\" --date=" $1; cmd | getline conv_date; print "[" conv_date "] (kubectl events) " $2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.security.Key; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.UnrecoverableKeyException; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.*; | |
import hudson.model.Job; | |
import hudson.model.Run; | |
import hudson.model.queue.QueueTaskFuture; | |
import org.jenkinsci.plugins.workflow.cps.replay.ReplayAction; | |
String text = "node('some-node') { echo 'hi'; }" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kubernetes Server: 1.3 | |
# If this is the first time that apply is being called | |
curl -X POST -H "Content-Type: application/json" "${KUBERNETES_API_SERVER}"/apis/extensions/v1beta1/namespaces/my-namespace/deployments/ --data @my-deployment-spec.json | |
# If this is the first time that apply is being called | |
curl -X PATCH -H "Content-Type: application/json-patch+json" "${KUBERNETES_API_SERVER}"/apis/extensions/v1beta1/namespaces/my-namespace/deployments/my-deployment --data @my-deployment-spec.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
import argparse, sys | |
import os, subprocess | |
import xml.etree.ElementTree as ET | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--rssfile", help="Location of RSS feed file downloaded from Panopto", | |
required=True, type=argparse.FileType('r')) | |
args = parser.parse_args() |
- Setting up docker to use a different image directory: https://stackoverflow.com/a/34731550
- Jellyfin docker image:
docker run --name "jellyfin-server" --restart=unless-stopped -d -v $(pwd)/config/:/config -v $(pwd)/cache/:/cache -v /home/nemty/media:/media --net=host jellyfin/jellyfin
- Filter CSV based on number of words in a field using
awk
:
awk -F ',' 'split($2,a," ") == 2 {print $2}' fname
- Convert Kubernetes events to local timezone (for comparison with other logs):
kubectl get events -o json | jq '.items[] | .lastTimestamp + "," + .message' | tr -d '"' | awk -F',' '{cmd="date +\"%d/%b/%Y:%T\" --date=" $1; cmd | getline conv_date; print "[" conv_date "] (kubectl events) " $2}'
- Remove EOS/BOS from a text data file using
sed
OlderNewer