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/sh | |
| # Parse command line arguments | |
| node_id="" | |
| restate_ver="" | |
| args="" | |
| while [ $# -gt 0 ]; do | |
| case $1 in | |
| -i) |
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
| use std::ops::RangeInclusive; | |
| use bilrost::{Message, OwnedMessage}; | |
| use bytes::Bytes; | |
| #[derive(bilrost::Message)] | |
| struct Container { | |
| inner: Inner, | |
| } |
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
| use std::ops::RangeInclusive; | |
| use bilrost::{ | |
| buf::ReverseBuf, | |
| encoding::{ | |
| Capped, DecodeContext, Decoder, EmptyState, Encoder, ForOverwrite, General, TagMeasurer, | |
| TagRevWriter, TagWriter, WireType, Wiretyped, | |
| }, | |
| DecodeError, Message, OwnedMessage, | |
| }; |
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
| x-environment: &default-env | |
| RESTATE_ALLOW_BOOTSTRAP: "false" | |
| RESTATE_CLUSTER_NAME: "test-cluster" | |
| RESTATE_ROLES: '["admin","worker","log-server","metadata-store"]' | |
| RESTATE_METADATA_STORE__TYPE: "raft" | |
| RESTATE_METADATA_STORE_CLIENT__ADDRESSES: '["http://node-1:5122","http://node-2:5122","http://node-3:5122"]' | |
| x-variables: | |
| common_settings: &common_settings | |
| image: localhost/restatedev/restate:unknown |
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/sh | |
| # this script is called as `volstat.sh <path/to/subvol>` | |
| set -e | |
| vol=$1 | |
| id=$(btrfs subvol show $vol | grep 'Subvolume ID:'| cut -f 4) | |
| output=$(btrfs qgroup show --raw -r $vol| grep "^0/$id") | |
| size=$(echo $output | cut -d ' ' -f 4) |
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 bash | |
| socket="/tmp/virtiofs.sock" | |
| # override this as well if u wanna change | |
| # the vm entry point | |
| init=/sbin/init | |
| # pass to extracted tarball | |
| dir=$1 |
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
| set -e | |
| # you need to run `docker save <image> -o <file>.tar | |
| # then run this script like `extrat-image.sh <file>.tar` | |
| # it will create a directoyr `<file>.tar-root` which containers | |
| # all files from the image extracted | |
| input=$1 | |
| if [ ! -f "${input}" ]; then | |
| echo "file does not exist" |
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
| use std::collections::HashMap; | |
| struct Module; | |
| struct Data { | |
| modules: HashMap<String, Module>, | |
| } | |
| impl Data { | |
| fn module<S: AsRef<str>>(&mut self, name: S) -> &mut Module { | |
| if let Some(m) = self.modules.get_mut(name.as_ref()) { |
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 sh | |
| set -e | |
| sudo systemctl stop bluetooth | |
| sudo modprobe -r btusb btrtl btbcm btintel | |
| sudo modprobe btusb | |
| sudo systemctl start bluetooth | |
| pulseaudio -k | |
| sleep 1s | |
| bluetoothctl power on |
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 sh | |
| # this file depends on rankmirrors package | |
| tmp=$(mktemp) | |
| trap "rm -f ${tmp}" EXIT | |
| curl "https://www.archlinux.org/mirrorlist/?country=BE&country=FR&country=DE&country=IL&protocol=http&protocol=https&ip_version=4&use_mirror_status=on" | sed "s/#Server/Server/g" > $tmp | |
| rankmirrors ${tmp} | sudo tee /etc/pacman.d/mirrorlist |
NewerOlder