Skip to content

Instantly share code, notes, and snippets.

@DinisCruz
DinisCruz / ciso-mindmap-2025.json
Last active March 31, 2025 09:13
First pass at creating a JSON version of the CISO MindMap created by Rafeeq Rehman https://www.linkedin.com/feed/update/urn:li:activity:7312240126099636224/ (created by Claude 3.7)
{
"title": "InfoSec Professionals Responsibilities",
"categories": [
{
"name": "Security Operations",
"subcategories": [
{
"name": "Threat Prevention (NIST CSF Identify & Protect)",
"items": [
"Asset Management",
@DinisCruz
DinisCruz / 1. Whitepaper-AWS_Lambda@Edge_Logging_to_OpenObserve.md
Last active February 22, 2025 18:56
Whitepaper: AWS Lambda@Edge Logging to OpenObserve (lambda code is after the whitepaper)

Whitepaper: AWS Lambda@Edge Logging to OpenObserve

by Dinis Cruz and ChatGPT Deep Research, 22-Feb-2025

1. Introduction

Overview: This whitepaper describes an architecture for capturing Amazon CloudFront requests using AWS Lambda@Edge and forwarding the logs to OpenObserve for centralized analysis. We integrate CloudFront (as the content delivery network) with a logging Lambda@Edge function that sends request details to OpenObserve, an open-source observability platform. This approach provides near real-time visibility into CDN traffic without waiting for standard CloudFront access logs (which can have delays of up to 24 hours (amazon web services - How to capture lambda @edge requests to kinesis? - Stack Overflow)). OpenObserve’s analytics engine allows us to search and visualize these logs with custom dashboards and real-time alerts ([Monitoring CloudFront Access Logs with K

@DinisCruz
DinisCruz / open-observe__deep-research.md
Created February 22, 2025 18:32
Here is a research document created by Chat GPT Pro Deep Research on 22th Feb 2025

OpenObserve.ai: Company and Competitive Analysis

Company Size and Structure

OpenObserve is a small, fast-growing startup with a globally distributed team. The company is headquartered in San Francisco, California (OpenObserve | Open Source Observability Platform for Logs, Metrics, Traces, and More – Your Ultimate Dashboard for Alerts and Insights) and operates as a remote-first organization with team members around the world (About Us | Open Source Observability Platform for Logs, Metrics, Traces, and More – Your Ultimate Dashboard for Alerts and Insights). As of 2024, OpenObserve has on the order of a few dozen employees (approximately 20–25) (OpenObserve | Startup Profile and Investments - Bounce Watch). The company’s leader

import json
import base64
import gzip
import io
import logging
from urllib.parse import unquote_plus
# Configure logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)

Interesting Graphs

These are some funny looking graphs that I created (most likely by accident :) )

#1) A Startship?

@DinisCruz
DinisCruz / formatting-philosophy.md
Created January 8, 2025 11:49
guidelines on python code formating

Code Formatting Philosophy and Principles

Core Principles

1. Visual Pattern Recognition

The human brain excels at pattern recognition. This formatting prioritizes creating clear visual patterns that make code structure immediately apparent:

  • Aligned equals signs create vertical lanes that guide the eye
  • Consistent comma placement creates predictable rhythm
  • Grouped imports with aligned elements form distinct visual blocks
“Hi. I need you to help me to transcribe an idea that I have, and at each step I want to annotate it, and then give me a quick description about what I've just presented.”
00:14
ChatGPT said:
ChatGPT
Sure, I'd be happy to help! Please go ahead and describe your idea, step by step, and I'll annotate each one with a quick description.
@DinisCruz
DinisCruz / 1__Claude.3.5-High-level-bulletpoints.md
Last active December 20, 2024 16:18
Raw data created when writing the "Empowering Devs, DevOps and Finance Teams with GenAI-driven Cloud Cost Intelligence" article https://www.linkedin.com/pulse/empowering-devs-devops-finance-teams-genai-driven-cloud-dinis-cruz-sxybe/

Cloud Cost Analysis: Connecting Technical Usage to Business Value

Core Concept

This project aims to create a system that connects cloud usage costs to specific projects and business owners, driven by the finance team. The key objective is not cost reduction (though that may be a side effect) but rather to maximize usage efficiency and empower development teams to improve their pipelines.

Project Overview

Key Objectives

  • Connect cloud spend with business usage and strategy
@DinisCruz
DinisCruz / Linked-in-post.md
Last active March 7, 2024 15:36
make LinkedIn Post page printer friendly

"Creating a 'Print-friendly' version of a LinkedIn post that can be shared as a PDF or PNG" - How hard could it be, right?

TL;DR: Use the JavaScript code from this GIST: https://gist.github.com/DinisCruz/d5e4bb4d8a6dcd7b25e31d160c747f1e

Unless I'm missing something very obvious, there isn't an easy way to create a PDF or a PNG image from a LinkedIn post (I need posts in this format so that I can easily share them on WhatsApp, Discord, or Slack).

As an example, I wanted to share the daily poem that I posted today (see https://www.linkedin.com/posts/diniscruz_here-is-a-poem-for-the-7th-of-march-2024-activity-7171459601492602880-Tkzs) with my family, which includes some members who are not on LinkedIn.

What I wanted was to create something like what you can see in pic2, i.e., a reasonably formatted pdf/png that allows for the easy reading of the post's content (and images).

function hide(selector) { $(selector).setAttribute('style','display:none')}
function remove(selector) { $(selector).remove()}
function remove_class(selector) { $(selector).setAttribute('class','')}
function move_left(count)
{
var eventObj = document.createEvent("Events");
eventObj.initEvent("keydown", true, true);
eventObj.which = 37; // left key
for (i=0; i < count ; i++) {