This file contains hidden or 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
# snippet for .ssh/config | |
Host *.lxd | |
#User ubuntu | |
#StrictHostKeyChecking no | |
#UserKnownHostsFile /dev/null | |
ProxyCommand nc $(lxc list --format csv -c s4 $(echo %h | sed "s/\.lxd//g") %h | python3 -c "import csv,sys; print([ip for ip in [e.split('\n') for s,e in list(csv.reader(sys.stdin)) if s == 'RUNNING'][0] if | |
'eth' in ip][0].split(' ')[0])") %p |
This file contains hidden or 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
https://discuss.linuxcontainers.org/t/lxd-netplan-static-ips-in-same-subnet-how-to/1074/7 | |
$ lxc profile show lan | |
config: {} | |
description: "" | |
devices: | |
br0: | |
nictype: bridged | |
parent: br0 | |
type: nic |
This file contains hidden or 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
diff --git a/build/build.sh b/build/build.sh | |
index 485c6ca..df82658 100755 | |
--- a/build/build.sh | |
+++ b/build/build.sh | |
@@ -45,6 +45,8 @@ export GOARCH="${ARCH}" | |
( | |
cd client | |
npm install --loglevel=error | |
+ chmod 755 ./node_modules/webpack/bin/webpack.js | |
+ |
This file contains hidden or 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/bash | |
# Create lxc profile that allows using snaps in the container | |
NAME=snap | |
lxc profile create $NAME &> /dev/null || true | |
cat << EOF | lxc profile edit $NAME | |
name: $NAME | |
description: Set up snaposity | |
config: | |
security.nesting: "true" | |
user.vendor-data: | |
This file contains hidden or 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
env PROMETHEUS=/usr/bin/prometheus | |
env CONFIG=/etc/prometheus/prometheus.yml | |
env USER=prometheus | |
env GROUP=prometheus | |
env DEFAULTS=/etc/default/prometheus | |
env RUNDIR=/var/run/prometheus | |
env PID_FILE=/var/run/prometheus/prometheus.pid | |
pre-start script | |
[ -e $DEFAULTS ] && . $DEFAULTS |
This file contains hidden or 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/bash | |
# Set up an lxc container with google chrome so it runs confined but displayed on the | |
# localhost. | |
# Adapted from https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/ | |
# Assume setguid/setid for root is properly setup | |
# root:1000:1 | |
# Assume aptcache profile exists, see https://gist.github.com/Roadmaster/754110f3f49fef19ec89ae29f29edd11 | |
LXC_NAME=chrome-container |
This file contains hidden or 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/bash | |
# Create lxc profile with apt caching | |
# Requires installing apt-cacher-ng to 10.0.4.1 (your host) | |
# Could be improved by making the actual apt cache host tunable | |
# Then use like: | |
# lxc launch -p default -p aptcache ubuntu:16.04 my-cached-container | |
NAME=aptcache | |
CACHE_IP=$(ip addr list lxdbr0 | grep -Po 'inet \K[\d.]+') | |
if ! ping -c 1 "$CACHE_IP" -w 1 >/dev/null 2>&1; then |
This file contains hidden or 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
namespace=${1:-tomechangosubanana} | |
name=${2:-1} | |
rev=${3:-2} | |
cat > snapcraft.yaml <<EOF | |
name: hello-$namespace-$name | |
version: $rev | |
summary: say hello | |
confinement: strict | |
grade: stable |
This file contains hidden or 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
name: lsdalton-roadmr | |
version: '1.3' | |
summary: LsDalton quantum chemistry program | |
description: | | |
LsDalton quantum chemistry program or computing Hartree-Fock and DFT wave | |
functions, energies, and molecular properties. For correlated models, MP2 | |
geometry optimizations and CCSD energies (not linear-scaling) are available. | |
Most parts of lsDalton employ linear scaling and massively parallel | |
implementations, which makes it suitable for calculations on large molecular | |
systems, in particular when the calculations are carried out on large super |
This file contains hidden or 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
#!/usr/bin/python3 | |
""" | |
Find which test in the test list is causing the failure of a known-failing | |
test. That is - Given a test list which dictates a specific test order, | |
under which a test X (which passes when run in isolation) is failing, find | |
out which of the tests that, on the list, run before X, are causing it to | |
fail. | |
Many of our test runs use parallelization to run faster. Sometimes we see test | |
failures which we can't reproduce locally, because locally we usually run |