Skip to content

Instantly share code, notes, and snippets.

- job_name: 'reddit-endpoints'
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
# Используем действие keep, чтобы оставить только эндпоинты сервисов с метками “app=reddit”
- source_labels: [__meta_kubernetes_service_label_app]
action: keep
regex: reddit
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: drop
- job_name: 'reddit-endpoints'
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
# Используем действие keep, чтобы оставить только эндпоинты сервисов с метками “app=reddit”
- source_labels: [__meta_kubernetes_service_label_app]
action: keep
regex: reddit
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: drop
rbac:
create: false
alertmanager:
## If false, alertmanager will not be installed
##
enabled: false
pushgateway:
enabled: false

Keybase proof

I hereby claim:

  • I am weitbelou on github.
  • I am ikosolapov (https://keybase.io/ikosolapov) on keybase.
  • I have a public key ASABDLJcXpINn93I5PdcQo8lD0EncDDYOchv0cLNuj0Rugo

To claim this, I am signing this object:

@grim-yawn
grim-yawn / Dockerfile
Created January 3, 2018 12:43
Dockerfile for specific gcc version
# Сперва docker build -t <image_name> .
# Потом docker run --rm <image_name>
FROM python:3.5
RUN apt-get install g++-4.9
CMD ["gcc", "--version"]
std::shared_ptr<MeshBase> MeshFactory::create_mesh(const json &mesh_properties)
{
const std::string mesh_type = mesh_properties["type"].get<std::string>();
const json geometry = mesh_properties["geometry"];
if (mesh_type == "cube") {
return create_cube_mesh(geometry);
}
// Некторое колличество else if (...)
else if (mesh_type == "cylinder") {
@grim-yawn
grim-yawn / SolidBody.cpp
Created March 7, 2017 13:31
Magic numbers
double calculateBottom(double x, double z) {
if (21.75 <= x && x <= 44.78 && 74.32 <= z && z <= 114.12) {
return 0.82;
} else if (21.75 <= x && x <= 44.78 && 70.84 <= z && z <= 74.32) {
return 0.82 * (z - 70.84)/(74.32 - 70.84);
} else if (17.46 <= x && x <= 21.77 && 88.88 <= z && z <= 94.12) {
return 0.82 * (x - 17.46) / (21.77 - 17.46);
} else if (44.67 <= x && x <= 48.47 && 88.88 <= z && z <= 94.12) {
return 0.82 * (x - 48.97) / (44.67 - 48.97);
}
void IceIslandWithLegsMesh::create_coarse_mesh()
{
dealii::Triangulation<3> cube;
const unsigned n = 11;
const double c = a / 11.0;
dealii::GridGenerator::subdivided_hyper_cube(cube, n, 0, a);
dealii::Triangulation<3> leg;
dealii::GridGenerator::hyper_rectangle(leg,
dealii::Point<3>(3 * c, 5 * c, a),
#include <array>
#include <utility>
#include <iostream>
#include <algorithm>
using namespace std;
class Triplet
{
public:
static Triplet read_triplet_from_stdin()
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int letter_to_index(char letter, char first_letter = 'a') {
return letter - first_letter;
}