Skip to content

Instantly share code, notes, and snippets.

View Emmanuerl's full-sized avatar

Chukwuemeka chukwurah Emmanuerl

View GitHub Profile
@Emmanuerl
Emmanuerl / xml_broken_attr_detector.py
Created February 27, 2025 10:23
This is a sample demonstration of a recursive XML broken attribute detector
import xml.etree.ElementTree as ET
import re
def find_broken_attributes(xml_string):
"""Find and report broken attributes in an XML string using recursion"""
# First try simple regex approach to find common broken attribute patterns
broken_attributes = find_broken_attributes_with_regex(xml_string)
# If no broken attributes found with regex, try parsing and recursively checking
if not broken_attributes:
@Emmanuerl
Emmanuerl / gostyle.md
Last active July 24, 2024 08:02
Golang Styleguide

So i've been asking the question: "how exactly should i write Golang in a very futuristic way?" futuristic meaning maintainable, flexible and of course, testable. I came across Mat Ryer's way which made a lot of sense, however, Russ Cox begs to differ, and of Russ Cox is whoever he thinks is within Golang's compound. So I dug further and found more resources, I'll try to update this gist as i continue this journey

Project Structure

TLDR; they all say the same thing: organise by function and not by type

@Emmanuerl
Emmanuerl / awk.MD
Created May 5, 2024 16:05
Backend study group AWK hands on session

The AWK CLI Tool

A step by step introduction into the AWK command, it's syntax, uses and sample use cases.

Introduction

The awk command is a column based manipulation tool that can be used for a variety of things, from reading CSVs to killing processes, literally. At the very core, AWK is based on the following awk '{expression to qualify output} {print $output expression}' Although it's a cli tool, it offers a lot of programming language paradigms such as

@Emmanuerl
Emmanuerl / main.go
Last active May 1, 2024 21:33
Integrate file uploads and S3 Bucket
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"time"
@Emmanuerl
Emmanuerl / go-chat.MD
Last active March 16, 2024 12:15
a snapchat inspired backend chat application