Skip to content

Instantly share code, notes, and snippets.

View kofemann's full-sized avatar
Working on the next great thing....

Tiramisu Mokka kofemann

Working on the next great thing....
View GitHub Profile
@kofemann
kofemann / annotated-file.spec
Created June 30, 2020 12:02
Annotated spec file
#
# Author: Wayne Pollock pollock@acm.org
#
# See: http://wpollock.com/AUnix2/specFileWithComments.htm
#
# A spec file contains a number of sections, in a specific order,
# each of which contains tags and/or data. Comments and blank lines
# are ignored. Tags are of the form "name:value". The names of
# tags are not case-sensitive; white-space around the colon is optional.
@kofemann
kofemann / postgres-cluster.yaml
Created May 1, 2020 16:41
Running postgres in kubernetes
#
# postgres cluster in kubernetes with max 8 replicas
#
# the master is always on ${host}-0
#
#
# postgres master/slave configuration
#
@kofemann
kofemann / giava-java8-future.md
Last active April 6, 2023 07:36
Howto migrate from guava's Listenablefuture to java8 completableFuture
@kofemann
kofemann / srr_validate.py
Created April 1, 2020 10:33
Validate Storage resource record as defined by WLCG Storage Space accounting project
#!/usr/bin/env python
import json
import jsonschema
import urllib.request
import urllib.parse
import sys
import ssl
def load(path):
@kofemann
kofemann / fix-chimera-bd.sql
Created October 14, 2019 19:19
chimera db missing procedure
CREATE OR REPLACE FUNCTION inumber2path(bigint, bigint) RETURNS varchar AS $$
DECLARE
inumber bigint := $1;
iroot bigint := $2;
path varchar := '';
entry record;
BEGIN
IF iroot = inumber
THEN
@kofemann
kofemann / poolmanager.conf
Created October 7, 2019 18:31
dCache's pool manager configuration for distributed site
psu set regex off
psu set allpoolsactive off
psu create unit -store *@*
psu create unit -net 0.0.0.0/0.0.0.0
psu create unit -net 10.17.7.0/24
psu create unit -net ::/0
psu create unit -protocol */*
psu create ugroup any-protocol
@kofemann
kofemann / root-io.ipynb
Last active September 22, 2019 11:42
ROOT in a Jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kofemann
kofemann / dcap-client-server.md
Created July 1, 2019 12:23
DCAP data channel wire protocol

Overview

  • The Mover-Client connection is a binary connection which, TCP wise, may be initiated by either parties.
  • The mover starts the communication by sending the Mover HELLO BLOCK (see below).
  • All subsequent commands are initiated by the client.
  • The protocol is limited to synchronous request-reply communication. Therefore a command can only be issued after the previous command was completed.
  • The connection can either be in Command Mode, which is the initial mode, or in Data Transfer Mode.
  • Each command has to be acknowledged immediately by an REQUEST ACK. The REQUEST ACK reports the request state and in some cases additional, request dependent arguments . (e.g. LOCATE)
  • If the REQUEST ACK indicates success, the connection switches to Data Transfer Mode for READ and WRITE requests.
  • In Data Transfer Mode the data is send in DATA CHAINS ( see below).
@kofemann
kofemann / dcache-monitoring.md
Last active June 20, 2019 13:38
Reporting dCache java process CPU and Memory usage with beats

Reporting dCache CPU & Memory usage with metricbeats

Pre-requisites

  • Download and install Metricbeat. Use metricbeat-oss package, if you don't have xpack
  • Download Jolokia's JVM agent

Enable Jolokia JVM agent