Skip to content

Instantly share code, notes, and snippets.

@kamidzi
kamidzi / first_sample.bcftools.stats.txt
Created April 15, 2024 03:46
AllofUs test bcftools stats
~/workspaces_playground/duplicateofdeliriumtremensresearch/dataset_78200286_vcfs$ bcftools stats dataset_78200286_merged.first_half.vcf.gz
# This file was produced by bcftools stats (1.12+htslib-1.12) and can be plotted using plot-vcfstats.
# The command line was: bcftools stats dataset_78200286_merged.first_half.vcf.gz
#
# Definition of sets:
# ID [2]id [3]tab-separated file names
ID 0 dataset_78200286_merged.first_half.vcf.gz
# SN, Summary numbers:
# number of records .. number of data rows in the VCF
# number of no-ALTs .. reference-only sites, ALT is either "." or identical to REF
@kamidzi
kamidzi / nova_client_versions.py
Created October 4, 2018 15:13
Use string literals for novaclient api versions
from novaclient.client import Client as NovaClient
from ka_auth import get_session
from decimal import Decimal
str_versions = ['2', '2.1', '2.10', '2.26', '2.59', '2.60']
if __name__ == '__main__':
novaclient = __import__('novaclient')
attrs = ('API_MAX_VERSION', 'API_MIN_VERSION', '__version__')
for a in attrs:
@kamidzi
kamidzi / nova_test.py
Created April 28, 2017 20:38
Nova client test - DOB1
#!/usr/bin/env python
from novaclient import client
import os
import sys
VERSION = 2
params = [
('api_version', 2,),
('username', os.environ.get('OS_USERNAME'),),
('password', os.environ.get('OS_PASSWORD'),),
@kamidzi
kamidzi / pr1054.sh
Created June 20, 2016 21:08
Exercise pr1054 ?
#!/bin/bash
set -eu
d=$(git rev-parse --show-toplevel)
cd $d/bootstrap/vagrant_scripts || exit 1
if [[ ! -r Vagrantfile ]] ; then exit 2 ; fi
# create the aggregate
vagrant ssh vm1 -c 'bash <<EoF
@kamidzi
kamidzi / install_kdc.sh
Created April 27, 2016 21:11
krb5 mess about
#!/bin/bash
hash -r
set -eu
# bias towards heimdal
#sudo apt-get install -y heimdal-kdc
sudo apt-get install -y krb5-kdc krb5-admin-server
# For apache
sudo apt-get install libapache2-mod-auth-kerb
@kamidzi
kamidzi / gist:5d12750b19d57c2ea2c9
Created January 13, 2016 19:28
package test unpinning
packages=(
ceph
ceph-common
ceph-fs-common
ceph-fuse
ceph-mds
elasticsearch
erlang-asn1
erlang-base
erlang-corba
# Before
root@bcpc-vm1:~# lsof -itcp@192.168.100.11 -stcp:listen -n -P | sort -k9 -r -u
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 264336 root 6u IPv4 605279 0t0 TCP 192.168.100.11:80 (LISTEN)
apache2 264336 root 7u IPv4 605281 0t0 TCP 192.168.100.11:443 (LISTEN)
root@bcpc-vm1:~# curl -k -I https://192.168.100.{5,11}:443 http://192.168.100.{5,11}
HTTP/1.1 200 OK
x-amz-request-id: tx000000000000000000763-00567c0e3b-1131-default
Content-type: application/xml
Content-Length: 0
@kamidzi
kamidzi / gist:142b575260f6a8ed92b6
Created December 22, 2015 17:49
radosgw backend switching
### civetweb ###
root@bcpc-vm1:~# lsof -itcp@192.168.100.11 -stcp:listen -n -P | sort -k9 -r -u
root@bcpc-vm1:~# curl -k -i https://192.168.100.{5,11}:443 http://192.168.100.{5,11}
HTTP/1.1 200 OK
x-amz-request-id: tx000000000000000003fbc-005671ba51-3f9a-default
Content-type: application/xml
Content-Length: 214
Date: Wed, 16 Dec 2015 19:24:01 GMT
@kamidzi
kamidzi / qemu-ifup.patch
Created November 13, 2015 15:07
Patch to qemu-ifup for uefi pxe testing with BCPC
--- /etc/qemu-ifup 2015-10-23 09:03:57.000000000 +0000
+++ /usr/local/share/qemu/qemu-ifup 2015-11-12 19:35:15.293392567 +0000
@@ -3,6 +3,8 @@
# The idea is to add the tap device to the same bridge
# as we have default routing to.
+exec 2>>/var/log/qemu.log
+set -x
# in order to be able to find brctl
PATH=$PATH:/sbin:/usr/sbin