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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
--- | |
version: '3.5' | |
services: | |
jaeger-collector: | |
image: jaegertracing/jaeger-collector | |
command: [ | |
"--cassandra.keyspace=jaeger_v1_dc1", | |
"--cassandra.servers=cassandra", | |
"--sampling.initial-sampling-probability=.5", |
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
#include <stdlib.h> | |
#include <pthread.h> | |
#include "logger.h" | |
#include "queue.h" | |
static void lock(queue_t *q) | |
{ | |
pthread_mutex_lock(&(q->mutex)); | |
} |
Prometheus
Для сбора метрик с использованием Golang используются библиотеки из репозитория prometheus
// библиотека со всеми наборами метрик
import "github.com/prometheus/client_golang/prometheus"
Counter
(счетчик) - хранит значения, которые увеличиваются с течением времени
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
#!/usr/bin/env bash | |
ROOT=/opt/oracle | |
if [ ! -e $ROOT ]; then | |
mkdir -p $ROOT | |
fi | |
LIBS=instanclient_basic_lib.zip | |
if [ ! -e $LIBS ]; then | |
wget -O $LIBS https://github.com/bumpx/oracle-instantclient/raw/master/instantclient-basic-linux.x64-12.1.0.2.0.zip |
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
sub days_inmonth_inyear { | |
my ( $x, $y ) = @_; | |
return 28 + ( ( $x + int( $x / 8 ) ) % 2 ) + 2 % $x + int( | |
( 1 | |
+ ( 1 - ( $y % 4 + 2 ) % ( $y % 4 + 1 ) ) | |
* ( ( $y % 100 + 2 ) % ( $y % 100 + 1 ) ) | |
+ ( 1 - ( $y % 400 + 2 ) % ( $y % 400 + 1 ) ) | |
) / $x | |
) + int( 1 / $x ) - int( | |
( ( 1 - ( $y % 4 + 2 ) % ( $y % 4 + 1 ) ) |
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
function rus_to_latin ( str ) { | |
var ru = { | |
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i', | |
'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | |
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', | |
'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', | |
'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya' | |
}, n_str = []; |
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
// Before | |
if ( self.data('branches') ) { | |
checked_stack.push( this ); | |
} else { | |
var len = checked_stack.length; | |
if ( this.checked === true ) { | |
checked_stack.push( this ); |