Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <functional>
#include <string_view>
#include <mutex>
#include <map>
#include <thread>
#include <chrono>
#include <future>
template <typename ...Args>
@theanalyst
theanalyst / atomic.cpp
Created March 3, 2022 20:45
test syntax
std::atomic<int> sum {0};
struct Point {int x, int y};
struct D3 {int x, int y, int z};
022-02-05T20:01:21+01:00
Running ./src/randgen
Run on (8 X 24.1218 MHz CPU s)
CPU Caches:
L1 Data 64 KiB (x8)
L1 Instruction 128 KiB (x8)
L2 Unified 4096 KiB (x2)
Load Average: 1.65, 1.91, 2.07
----------------------------------------------------------------------------
Benchmark Time CPU Iterations

v15.2.1 Octopus

This is the first bugfix release of Ceph Octopus, we recommend all Octopus users upgrade.

Changelog

@theanalyst
theanalyst / base_branch.py
Last active February 5, 2020 17:14
change_base_branch
#!/usr/bin/env python
# do a `pip install githubpy` before running the script
import os
import github
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("target_sha", metavar="target_sha",
help="sha1 of the branch to update to")
  • ceph-volume zap always skips block.db, leaves them around (issue#40664, pr#30305, Alfredo Deza)
  • ceph-volume lvm.zap fix cleanup for db partitions (issue#40664, pr#30302, Dominik Csapak)
  • ceph-volume tests set the noninteractive flag for Debian (pr#29901, Alfredo Deza)
  • ceph-volume: do not fail when trying to remove crypt mapper (pr#30556, Guillaume Abrioux)
  • ceph-volume: fix stderr failure to decode/encode when redirected (pr#30299, Alfredo Deza)
  • ceph-volume: pre-install python-apt and its variants before test runs (pr#30296, Alfredo Deza)
  • ceph-volume: use the OSD identifier when reporting success (pr#29771
akey1=access1
skey1=secret1
radosgw-admin user create --uid=s3test1 --display-name='tester1' --access-key=$akey1 --secret=$skey1 --email=tester1@ceph.com
akey2=access2
skey2=secret2
radosgw-admin user create --uid=s3test2 --display-name='tester2' --access-key=$akey2 --secret=$skey2 --email=teester2@ceph.com
cat <<EOF > s3.conf
[DEFAULT]
#!/usr/bin/env python
import argparse
import logging
import string
import random
import boto3
from botocore.client import Config
import pytest
@theanalyst
theanalyst / plaintext.sh
Last active July 17, 2017 06:58
Rename prs
cat release-x.rst | sed "s/\`\([a-z]\+\#[0-9]\+\)\s\(<[a-z0-9://.]\+>\`\_\)/\1/g" > release-x.txt

v12.0.0 Luminous (dev)

This is the first development checkpoint release of Luminous series, the next long time release. We're off to a good start to release Luminous in the spring of '17.

Major changes from Kraken