The following document is now part of the official pysim documentation and available here: https://downloads.osmocom.org/docs/pysim/master/html/suci-tutorial.html
This gist is an archive and will not be updated.
| #!/bin/bash | |
| # Script to create an OpenWrt LXC container in Proxmox | |
| # Downloads from openwrt.org with latest stable or snapshot version, detects bridges/devices, IDs, configures network, sets optional password | |
| # Pre-configures WAN/LAN in UCI, includes summary and confirmation, optional LuCI install for snapshots with apk | |
| # Default resource values | |
| DEFAULT_MEMORY="256" # MB | |
| DEFAULT_CORES="2" # CPU cores | |
| DEFAULT_STORAGE="0.5" # GB |
| # CMake find_library() defaults to shared library before static. | |
| # this order can be programatically set as below. | |
| cmake_minimum_required(VERSION 3.1) | |
| project(demo LANGUAGES C) | |
| # arbitrary library to demo search | |
| if(MSVC) | |
| set(libname msvcrt) | |
| else() |
The following document is now part of the official pysim documentation and available here: https://downloads.osmocom.org/docs/pysim/master/html/suci-tutorial.html
This gist is an archive and will not be updated.
| #!/bin/bash | |
| set -Eeuo pipefail | |
| # Automatic cert requesting and signing for Cisco ASA | |
| # | |
| # Requirements | |
| # - Domain hosted in Aliyun DNS (for other DNS services, adjust the acme.sh arguments) | |
| # - ASA with rest-agent enabled | |
| # - Local computer: openssl, git, ca-certificates | |
| # |
| #!/bin/bash | |
| set -e | |
| INFILE="rc3-mcr-11512-eng-deu-CIA_vs_Wikileaks_hd.mp4" | |
| OUTDIR="output/" | |
| FRAMES=1000 | |
Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).
If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.
Steps:
| arch: amd64 | |
| cores: 24 | |
| features: fuse=1,mount=nfs;cifs,nesting=1 | |
| hostname: archxorg | |
| memory: 64000 | |
| net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=XX:XX:XX:XX:XX.XX,ip=dhcp,type=veth | |
| ostype: archlinux | |
| rootfs: local-zfs:subvol-100-disk-0,size=500G | |
| swap: 512 | |
| lxc.autodev: 1 |
| <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |
| <!-- ... --> | |
| <qemu:commandline> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/slic.bin'/> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/msdm.bin'/> | |
| <qemu:arg value='-smbios'/> | |
| <qemu:arg value='file=/some/path/smbios_type_0.bin'/> | |
| <qemu:arg value='-smbios'/> |
I needed to quickly encode a protobuf from the command-line, and while I pretty much immediately came across protoc --encode as the obvious solution, I did not find much documentation on the input textual syntax.
Here is the relevant snippet from protoc --help:
--encode=MESSAGE_TYPE Read a text-format message of the given type
from standard input and write it in binary
to standard output. The message type must
be defined in PROTO_FILES or their imports.
| #!/bin/bash | |
| MIN_SIZE=6G | |
| IN_DIR=. | |
| OUT_DIR=out | |
| find $IN_DIR -maxdepth 1 -type f -size +$MIN_SIZE -exec ffmpeg -y -i {} -c:v libx264 -preset slow -tune film -profile:v high -level 4.2 -crf 23 -c:a copy -c:s copy $OUT_DIR/{} \; |