Skip to content

Instantly share code, notes, and snippets.

View mayakerostasia's full-sized avatar

Maya Kerostasia mayakerostasia

View GitHub Profile
@mayakerostasia
mayakerostasia / password_should_be_string.md
Last active July 11, 2025 17:00
OED: Error: 'Password should be a string' when running 'npm start testData'

Sure!
I'm going to try to debug this specific error and tell you how I'm trying to figure it out, so let me first figure out where this missing password might be\

docker compose config  

will "render" the compose file it's pointing at, so I'm going to try that and check any environment variables

# # Beat tracking example
import multiprocessing
import librosa
import xml.etree.ElementTree as ET
def get_beat_times(file_path):
# 2. Load the audio as a waveform `y`
# Store the sampling rate as `sr`
y, sr = librosa.load(file_path)
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Example configs: https://github.com/LunarVim/starter.lvim
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
-- Enable powershell as your default shell
vim.opt.shell = "pwsh.exe"
vim.opt.shellcmdflag =
"-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
// xdg_direnv.go
// Package xdg is a minimal implementation of the XDG specification.
//
// https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
package xdg
import (
"path/filepath"
)
#[derive(Debug, Clone)]
pub struct BufferRequestBody(pub Bytes);
// we must implement `FromRequest` (and not `FromRequestParts`) to consume the body
#[async_trait]
impl<S> FromRequest<S> for BufferRequestBody
where
S: Send + Sync,
{
type Rejection = Response<Body>;
@mayakerostasia
mayakerostasia / client.rs
Created December 8, 2023 16:59
No memory?
use once_cell::sync::Lazy;
use crate::{ instrument, debug, Error, events::WebhookEvent };
use surrealdb::engine::remote::ws::{Ws, Client};
use surrealdb::opt::auth::Root;
use surrealdb::sql::Thing;
use surrealdb::Surreal;
const DB_ADDRESS: &'static str = "ws://127.0.0.1:8000";
@mayakerostasia
mayakerostasia / telemetry.rs
Created December 5, 2023 07:43
Otel Logs to Loki Setup
// https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-otlp/examples/basic-otlp/src/main.rs
const LOGS_ENDPOINT: &str = "http://localhost:55680";
const COLLECTOR_ENDPOINT: &str = "http://localhost:4317";
const METRICS_ENDPOINT: &str = "http://localhost:4317";
// use env_logger::Logger;
// use log::logger;
// use color_eyre::eyre::Error;
use opentelemetry::global::{GlobalLoggerProvider, GlobalTracerProvider, GlobalMeterProvider};
@mayakerostasia
mayakerostasia / main.rs
Created December 1, 2023 22:42
Tracing + Opentelemetry_OTLP
mod telemetry;
use tracing::{ info, instrument, Level };
use telemetry::initialize;
// use tracing_subscriber::prelude::*;
#[instrument]
fn one() {
println!("one")
}
#[tokio::main]
@mayakerostasia
mayakerostasia / cargo.toml
Last active November 29, 2023 16:04
Help With Tower + GRPC
[package]
name = "simple_ti"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "simple_ti"
path = "src/client.rs"
@mayakerostasia
mayakerostasia / main.rs
Last active July 16, 2024 04:48
Rust Message bus
#![allow(unused)]
use std::collections::HashMap;
use std::collections::VecDeque;
use std::thread::JoinHandle;
use tokio::sync::Mutex; use std::sync::Arc;
type MessageQueue = VecDeque<Message>;
type MailboxMap = HashMap<String, MessageQueue>;