Skip to content

Instantly share code, notes, and snippets.

View rostrovsky's full-sized avatar
💭
sup

rostrovsky

💭
sup
View GitHub Profile
@rostrovsky
rostrovsky / autoRowSpan.js
Last active November 9, 2023 23:14
Automatic rowspan in the table
function autoRowSpan(tableId) {
var table = document.getElementById(tableId);
var rows = table.rows;
// Iterate through each column
for (var colIndex = 0; colIndex < rows[0].cells.length; colIndex++) {
var prevCell = null;
var prevCellText = '';
var rowspan = 1;

Question

i would like to use terragrunt. what i dont like in it is this structure it enforces:

└── live
    ├── prod
    │   ├── app
    │   │   └── main.tf
 │ ├── mysql
@rostrovsky
rostrovsky / f.md
Last active September 2, 2023 19:28
Basic setup of zsh + nvim on Ubuntu 22.04 WSL2
sudo apt install zsh
chsh -s $(which zsh)
exit

Log on again

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@rostrovsky
rostrovsky / prom.md
Created July 7, 2023 12:40
Prometheus storage analysis

Prometheus itself doesn't provide built-in tools to directly analyze which metrics are using the most storage. However, there are several ways you can get an idea of which metrics are taking up a lot of space:

  1. Cardinality: A single Prometheus metric with high cardinality (a large number of unique timeseries) can take up a lot of storage. You can use PromQL queries to find metrics with high cardinality. One such query might be count({__name__=~".+"}) by (__name__), which will count the number of unique timeseries for each metric.

  2. Metric volume: You can also check the rate at which metrics are ingested into Prometheus, using a query like rate(prometheus_tsdb_head_samples_appended_total[5m]). This will give you an idea of how many samples are being ingested, which could be a good proxy for understanding which metrics are taking up a lot of space. However, this query won't directly tell you which metrics are responsible for the volume, but will tell you how quickly you're accumulating data ove

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test page</title>
</head>
<body>
<div class="first-nav">
<ul class="nav-list">
<li class="nav-list-item">first-nav item 0</li>