Skip to content

Instantly share code, notes, and snippets.

@kuzaxak
kuzaxak / query1.json
Created June 8, 2024 17:46
Examples of queries from Opensearch Dashboards
{
"sort": [
{
"time": {
"order": "desc",
"numeric_type": "date_nanos",
"unmapped_type": "boolean"
}
}
],
@kuzaxak
kuzaxak / quickwit-proxy.py
Last active June 8, 2024 17:57
Proxy app to make QuickWit api compatible with Opensearch Dashboards
import logging
import sentry_sdk
from flask import Flask, jsonify, request, make_response
import requests
import json
import sys
sentry_sdk.init()
app = Flask(__name__)
@kuzaxak
kuzaxak / app.py
Created April 4, 2024 19:09
OpenDashboards to Quickwit proxy to make them compatible
from flask import Flask, jsonify, request
import requests
import json
app = Flask(__name__)
TARGET_URL = "http://quickwit-control-plane:7280"
@app.route('/_resolve/index/<index_pattern>')
def resolve_index(index_pattern):
target_url = f'{TARGET_URL}/api/v1/indexes?index_id_patterns={index_pattern}'
@kuzaxak
kuzaxak / Dockerfile
Created December 3, 2022 22:04
poetry docker gunicorn
FROM public.ecr.aws/docker/library/python:3.11-bullseye
ENV POETRY_VERSION='1.2.2' \
POETRY_HOME=/etc/poetry \
PATH="/etc/poetry/bin:${PATH}" \
POETRY_VIRTUALENVS_CREATE=false
WORKDIR /app
RUN curl -sSL https://install.python-poetry.org | python3 - && \
@kuzaxak
kuzaxak / Dockerfile
Created September 8, 2022 16:35
OpenTelemetry nginx extension
ARG image=alpine:3.14.2
FROM $image AS build
RUN apk update \
&& apk upgrade \
&& apk add \
curl \
git \
build-base \
linux-headers \
```
^[[0m207ea326 keyA block 3 nt/nr/ar: df445517 e455bcb2 f08c54c1
19:38:18.062 782435395 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 7 nt/nr/ar: 7edb15b8 c1449917 2dd49592
19:38:18.083 782435409 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 11 nt/nr/ar: 6c4df1bd 47c63829 54a90977
19:38:18.104 782435423 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 15 nt/nr/ar: abbe21eb 384bdd86 f6c8aa97
19:38:18.126 782435438 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 19 nt/nr/ar: 251d2171 471b45d4 c3988736
19:38:18.146 782435453 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 23 nt/nr/ar: a51d9551 5d1e1ffd beb14b47
19:38:18.167 782435466 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 27 nt/nr/ar: a2766b9e 0be3f80e 936cdd7a
19:38:23.435 782440707 ^[[0;34m[D][MfClassic]: ^[[0m207ea326 keyA block 3 nt/nr/ar: 7477fc07 345d1984 336efe68

Keybase proof

I hereby claim:

  • I am kuzaxak on github.
  • I am kuzaxak (https://keybase.io/kuzaxak) on keybase.
  • I have a public key whose fingerprint is FDB3 6527 F5FD 79C0 8AA2 E3DE EB6A 991A 4A32 EA83

To claim this, I am signing this object:

conn gcp-to-s7
type=tunnel
authby=secret
left=207.154.219.69
leftid=207.154.219.69
leftsubnet=10.19.0.0/24
leftfirewall=yes
right=5.200.46.37
rightsubnet=172.23.16.0/24
auto=add
var session = require('express-session')
var express = require('express')
var Cookies = require( "cookies" )
var app = express()
app.set('trust proxy', 1) // trust first proxy
app.use(session({
secret: 'keyboard cat',
resave: false,
Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr