This file contains 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
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: example-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
spec: | |
rules: | |
- http: |
This file contains 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 cvt <vertical> <horizontal> <refresh-rate> to create, ex. cvt 2560 1440 90 | |
#xrandr --newmode "2560x1440_60.00" 311.83 2560 2744 3024 3488 1440 1441 1444 1490 -HSync +Vsync | |
#xrandr --addmode Virtual1 2560x1440_60.00 | |
xrandr --newmode "2560x1440_144.00" 808.75 2560 2792 3072 3584 1440 1443 1448 1568 -hsync +vsync | |
xrandr --addmode Virtual1 2560x1440_144.00 | |
#xrandr --newmode "2560x1440_90.00" 483.00 2560 2768 3048 3536 1440 1443 1448 1519 -hsync +vsync | |
#xrandr --addmode Virtual1 2560x1440_90.00 |
This file contains 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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
func TestPersist(t *testing.T) { | |
dir, err := ioutil.TempDir("", "badgerTest") | |
assert.NoError(t, err) | |
p := func(t *testing.T, dir string, test func(t *testing.T, sw spanstore.Writer, sr spanstore.Reader)) { | |
f := NewFactory() | |
opts := NewOptions("badger") | |
v, command := config.Viperize(opts.AddFlags) | |
keyParam := fmt.Sprintf("--badger.directory-key=%s", dir) |
This file contains 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
static class ZipfDistribution | |
{ | |
private ThreadLocalRandom random; | |
private double alpha; | |
private int elements; | |
private double constant; | |
private double[] sumsOfProbabilities; | |
public ZipfDistribution(double alpha, int elements) |
This file contains 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 | |
PARANOID=$(cat /proc/sys/kernel/perf_event_paranoid) | |
RESTRICT=$(cat /proc/sys/kernel/kptr_restrict) | |
if [ $PARANOID -gt 1 ] | |
then | |
echo "ERROR: echo 1 > /proc/sys/kernel/perf_event_paranoid" | |
exit -1 | |
fi |
This file contains 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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
/* | |
* Copyright 2017 Red Hat, Inc. and/or its affiliates | |
* and other contributors as indicated by the @author tags. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains 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
import re | |
import csv | |
import codecs | |
import time | |
from hawkular import metrics, HawkularMetricsClient | |
class PerfmonCSVParser: | |
def __init__(self): | |
self.c = HawkularMetricsClient(tenant_id='perfmon') |