Skip to content

Instantly share code, notes, and snippets.

View ivanahuckova's full-sized avatar

Ivana Huckova ivanahuckova

View GitHub Profile
import { TestScheduler } from 'rxjs/testing';
import { map, concatWith, take, delay } from 'rxjs/operators';
import { from, of, catchError, interval } from 'rxjs';
describe('Marble testing', () => {
let testScheduler;
beforeEach(() => {
testScheduler = new TestScheduler((actual, expected) => {
expect(actual).toEqual(expected);
const express = require('express');
const cors = require('cors');
const faker = require('faker');
const app = express();
const data = [];
for (let i = 0; i < 200000; i++) {
let firstName = faker.name.firstName();

Prometheus backend migrations manual tests

These tests are related to this Epic: grafana/grafana#37784

Prerequisites

  • Create new prometheus prometheus-demo data sources that points to http://demo.robustperception.io:9090, choose server(default) access
  • Each tests starts with plain Explore or Dashboard state
  • Select prometheus-demo data source

Explore

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@ivanahuckova
ivanahuckova / PromMonacoEditor.tsx
Last active January 15, 2021 17:34
Dependencies that needs to be installed: @monaco-editor and monaco-promql.
import React, { ReactNode } from 'react';
import { css } from 'emotion';
import _ from 'lodash';
import { ButtonCascader, CascaderOption, withTheme } from '@grafana/ui';
import { ExploreQueryFieldProps, QueryHint, GrafanaTheme } from '@grafana/data';
//Monaco
import { ControlledEditor as Editor, monaco } from '@monaco-editor/react';
import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api';
package main
import (
"fmt"
"math/rand"
"os"
"os/signal"
"syscall"
"time"
"github.com/afiskon/promtail-client/promtail"
)
// Include all necessary libraries
#include <Arduino.h>
#include <WiFi.h>
#include <NTPClient.h>
#include <HTTPClient.h>
#include <DHT.h>
#include <HCSR04.h>
#include "config.h"