Skip to content

Instantly share code, notes, and snippets.

View heilgar's full-sized avatar
🚀
Imagine greater

Oleg heilgar

🚀
Imagine greater
View GitHub Profile

Code is a bit rough around the edges (“dirty”), but the core functionality works end-to-end. Will update this one in a while

I am using Tempo, Loki, Prometheus in containers.

Prometheus caveat: we have to init metrics after we started sdk

import { OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME } from "@/config";
@heilgar
heilgar / colorscheme.lua
Created April 7, 2025 14:20
Colorscheme
return {
"catppuccin/nvim",
name = "catppuccin",
lazy = false,
priority = 1000,
config = function()
require("catppuccin").setup({
background = {
light = "latte",
dark = "mocha",
@heilgar
heilgar / gist:0e1421c032cea6d362e54c0652c22cf3
Created January 13, 2025 15:12
AWS Logs Insights Query - Select error records
fields @timestamp, @message, @logStream, @log
| filter @message like /(?i)(error|exception|fail)/ and @message not like /hasErrorHandler/
| sort @timestamp desc
| limit 1000
<?php
namespace AppBundle\Doctrine;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as PDOPgSqlDriver;
use Doctrine\ORM\NativeQuery;
class PgSqlNativeQueryCursor
{
@heilgar
heilgar / 01_Laravel 5 Simple ACL manager_Readme.md
Created February 24, 2016 10:01 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php