Skip to content

Instantly share code, notes, and snippets.

@lmangani
lmangani / README.md
Last active April 11, 2024 08:12
Grafana 11.x LOG Explore

qryn + grafana 11

Explore Logs App

Explore Logs offers a query-less experience for browsing Loki logs without the need for writing complex queries. Discover or narrow down your search by using by volume and text patterns. Uncover related logs and and understand patterns—all with just a few clicks. No LogQL required! With Explore Logs, you can:

  • Easily find logs and log volumes for all of your services
  • Effortlessly filter service logs based on their log volumes, labels, fields, or patterns.
  • Automatically choose the best visualization for your log data based on its characteristics, without any manual setup.

...all without crafting a single query!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lmangani
lmangani / hyperswitch.js
Created December 30, 2020 17:02 — forked from maxymania/hyperswitch.js
NodeJS Hyperswarm utility.
/*
Copyright (C) 2019 Simon Schmidt
Usage of the works is permitted provided that this instrument is retained with
the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
*/
const hyperswarm = require('hyperswarm');
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will send metrics to outputs in batches of at most
## metric_batch_size metrics.
@lmangani
lmangani / index.html
Created November 30, 2019 13:14
GunRTC One-to-One
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/lib/unset.js"></script>
<style>
video {
background-color: #ddd;
border-radius: 7px;
@lmangani
lmangani / jitsi_analytics.js
Created January 27, 2019 11:43
JITSI Analytics Example
/* global ga */
(function(ctx) {
/**
*
*/
function Analytics(options) {
/* eslint-disable */
if (!options.googleAnalyticsTrackingId) {
@lmangani
lmangani / killhogs.sh
Last active January 22, 2018 00:39
Kill CPU hogs from CRON - a poor man's Monit
#!/bin/bash
# tries to kill process with highest CPU load
# (if it is part of a specified list of troublemakers)
MAXLOAD=5
TROUBLEMAKERS="chrome"
sleep 1 # wait a few seconds (just as a precaution)
@lmangani
lmangani / elassandra.md
Last active January 14, 2018 16:16
Elassandra Example

Elassandra Cheat-Sheet

This guide requires Elassandra 5.5.0.9

Elassandra Example:

Try indexing a document on a non-existing index:

curl -XPUT 'http://localhost:9200/twitter/doc/1?pretty' -H 'Content-Type: application/json' -d '
{
#!/bin/bash
files=(./config/*)
while true; do
nodejs hepgen.js -c "${files[RANDOM % ${#files[@]}]}"
sleep 2
done
@lmangani
lmangani / carina_client.env
Created August 12, 2016 20:41
Carina Docker (Client Fix)
export DOCKER_API_VERSION=1.22