Skip to content

Instantly share code, notes, and snippets.

View einnar82's full-sized avatar
🎯
Doing nice things.

Rannie Ollit einnar82

🎯
Doing nice things.
View GitHub Profile
@einnar82
einnar82 / claude.md
Created November 6, 2025 16:58
AI Document parse

AI Project Document Generator & Parser - Architecture Discussion

Date: November 6, 2025
Role: Head of Engineering
Context: RAG, MCP, and LLM expertise


Project Overview

@einnar82
einnar82 / README.md
Last active September 30, 2025 20:34
Log Management

Complete System Architecture

graph TB
    subgraph DEV_VM["Development VM"]
        D_MySQL[(MySQL DB<br/>EXISTING)]
        D_Maxwell[Maxwell CDC<br/>EXISTING]
        D_CDCPub[CDC Publisher<br/>NEW<br/>Port: 3001]
        
        D_MySQL -->|binlog stream| D_Maxwell
@einnar82
einnar82 / image.cs
Created August 23, 2024 13:14
image.cs
using System.Data.SqlClient;
using System.Drawing;
// ...
SqlConnection connection = new SqlConnection("your_connection_string");
SqlCommand command = new SqlCommand("SELECT TOP 1 MunMap FROM tblmunicipality", connection);
try
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MySql.Data.MySqlClient; // Ensure you have the MySQL Connector for .NET
public class MainForm : Form
{
private PictureBox pictureBox;
@einnar82
einnar82 / QueryParameterSearchFilter
Created June 9, 2023 01:59
Query filter using request routes in Laravel
<?php
namespace App\Filters\Search;
use Closure;
use Illuminate\Support\Arr;
use Laravel\Scout\Builder;
class QueryParameterSearchFilter
{
@einnar82
einnar82 / config.txt
Created February 10, 2022 11:30
Docker config DNS
Just change the nameserver lines in /etc/resolv.conf to:
nameserver 8.8.8.8
nameserver 8.8.4.4
@einnar82
einnar82 / index.php
Created December 15, 2021 06:26
PHP refresher
<?php
$name = 'rannie';
print $name;
function greetPerson($person)
{
// return '<br />hi '.$person;
return "<br />hi $person";
@einnar82
einnar82 / BaseRepository.php
Created November 21, 2021 07:25
Sample Repository Pattern for Laravel
<?php
namespace App\Repositories;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Pagination\Paginator;
abstract class BaseRepository
{
protected Model $model;
@einnar82
einnar82 / gist:4f8c3054448157db14daf608f35715be
Created October 25, 2021 07:23 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
<?php
//answer for https://www.testdome.com/questions/php/file-owners/11840?visibility=17&skillId=5
class FileOwners
{
public static function groupByOwners($files)
{
$result=array();
foreach($files as $key=>$value)
{
$result[$value][]=$key;