Skip to content

Instantly share code, notes, and snippets.

View simonespa's full-sized avatar

Simone Spaccarotella simonespa

View GitHub Profile
@simonespa
simonespa / big-media.md
Created July 28, 2026 15:38
Major Global Media Companies: Platforms, Studios, Networks, and Franchises

The table has been expanded to include major broadcast networks and cable brands for each company. Note that Comcast spun off most of its cable networks (including CNBC, MSNBC, USA Network, E!, and Syfy) into a newly formed independent entity called Versant Media Group. Comcast has retained the NBC broadcast network, the Bravo cable network, and Peacock. [1, 2, 3]

Major Global Media Companies: Platforms, Studios, Networks, and Franchises

Owning Company Primary Streaming Platform Core Picture Houses / Film Studios Major Television Production Studios Linear TV Networks & Cable Channels Top Major Movie Franchises
The Walt Disney Company Disney+ / Hulu / ESPN+ • Walt Disney Pictures • 20th Century Studios • Marvel Studios • Lucasfilm • Pixar & Disney Animation • Searchlight Pictures • 20th Television • Disney Television Animation • FX Productions • Marvel Television • ABC (Broadcast) • ESPN Networks • Disney Channel / Disney Junior / Disney XD • FX / FXX • N
@simonespa
simonespa / ec2-stack.js
Created April 28, 2026 14:16
CDK code to spawn an EC2 instance
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as iam from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
export class Ec2Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const keyPair = new ec2.KeyPair(this, 'KeyPair', {
@simonespa
simonespa / transformers.py
Created March 6, 2026 17:13
Transformers Speech Recognition Script
import sys
import numpy as np
from transformers import pipeline
from transformers.pipelines.audio_utils import ffmpeg_microphone_live
from curses import wrapper
import curses
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=0)
sampling_rate = pipe.feature_extractor.sampling_rate
@simonespa
simonespa / 01-soundness-completeness.md
Last active February 1, 2026 12:00
Computer Science and AI fundamentas

Soundness and Completeness

In formal logic and related fields, a system (such as a set of rules for proof) is considered sound if it cannot prove anything false, and complete if it can prove everything that is true.

Soundness

  • Definition: A proof system is sound if any formula that can be derived (proven) within the system is logically valid (true under all interpretations).
  • Guarantee: It ensures that all conclusions reached through the system's rules are correct. You can trust any statement that the system proves.
  • Informal: "You can't prove anything that's wrong".
  • Example: An argument like "All elephants are pink. Nelly is an elephant. Therefore, Nelly is pink" is valid in its form, but it is not sound because its first premise is false. A sound argument must have both a valid structure and true premises.
@simonespa
simonespa / einkorn.md
Last active January 14, 2026 09:37
Einkorn Bread Recipe

Einkorn Bread Recipe

  • Ratio: 5 parts flour to 3 parts water (5:3)
  • Hydration: 60%, up to 75%
  • Salt: 1.5% to 2% of the flour's weight
  • Yeast: 1% to 1.4% of the flour's weight for instant or dry yeast. Whole grain einkorn flour ferments faster than modern wheat, so a lower percentage of yeast (sometimes even 0.5%) is often sufficient, especially in slow-rise or no-knead recipes.
  • 1 teaspoon each of yeast and salt for every 500g of einkorn flour.
  • 200C for 20~ minutes, then lower to 180. Max cooking time, from 45 to 60 minutes

Example

@simonespa
simonespa / tsmc.md
Created November 25, 2025 10:04
TSMC, ASML, Nvidia

TSMC

Taiwan Semiconductor Manufacturing Company, is the world's largest dedicated semiconductor foundry, based in Taiwan and founded in 1987. The company manufactures and sells integrated circuits and other semiconductor devices for a global client base, including major tech companies, and has a reputation for leading process technology.

TSMC pioneered the "pure-play" foundry business model, focusing solely on manufacturing semiconductors for other companies rather than designing its own branded chips.

TSMC builds chips for Nvidia and Apple and about 80/90% of its chips production is in Taiwan

These types of chips (3 and 4 nanometers) can only be manufactured by 2 companies: TSMC and Samsung. To make these chips, you need an insane high precision, and only one company makes the machines to manifacture these chips, and it's called Advanced Semiconductor Materials Lithography (ASML).

@simonespa
simonespa / next-build-id.md
Created November 25, 2025 09:55
Next.js build ID forr _next/data/

Next.js

When you use a next/link to navigate to another route, and that upcoming route has a getServerSideProps method implemented, Next.js will send an API request to the server, which will run getServerSideProps and return a JSON containing the result. You can read about this in Next.js docs here. That resulted JSON fetch request data is used to render the upcoming route. Those data fetch requests have a path that looks like this: _next/data//.json.

The problem with that for our context — to be able to run multiple Next.js apps on same domain without base url prefix — is that Next.js doesn't give us a way to control this path. Which is to say there's no data fetch request path URL prefix which Next.js gives as a configuration option. Because of that we have a hard time finding a distinguishing factor for data URLs for multiple apps.

Remember that the data fetch url looks like _next/data//.json. If we could have a way generate unique for all our ap

@simonespa
simonespa / data-engineering.md
Created November 25, 2025 09:54
Data Engineering notes

Data engineering

  • Processing frameworks
  • Automation (scheduling)

Storage

  • MySQL
  • PostgreSQL
  • MongoDB
Render-blocking assets live on the Critical Path
Non render-blocking assets must stay off the Critical Path
HTML and CSS are render-blocking and live on the Critical Path. OPTIMISE THEM
JS can be both. Keep it off the Critical Path unless is vital it's loaded/executed asap
Images and fonts are off the Critical Path. KEEP THEM OFF
- Identify your critical assets
- Don't add any redirects
- Hit as few domains as possible
@simonespa
simonespa / application.yaml
Created October 10, 2025 17:26
Spring Boot example application.yaml file
# Server port configuration
server:
port: 8080
servlet:
context-path: /api # Base path for all endpoints
error:
include-message: always # Include error messages in responses for debugging purposes
include-binding-errors: always # Include binding errors in responses for debugging purposes
whitelabel:
enabled: false # Disable default whitelabel error page