Skip to content

Instantly share code, notes, and snippets.

View AronNovak's full-sized avatar

Aron Novak AronNovak

View GitHub Profile
@AronNovak
AronNovak / report.md
Created May 13, 2026 09:25
.HU sebességmérés / CMS eloszlás

Eredmények — összesítés

Framework / kategória Darabszám Arány
WordPress 154 77.0%
Parking / Suspended 11 5.5%
Webnode 4 2.0%
Joomla 2 1.0%
UNAS 1 0.5%
Next.js 1 0.5%
@AronNovak
AronNovak / check-speed.js
Created May 13, 2026 09:01
site speed measurements + CMS breakdown
#!/usr/bin/env node
const { chromium } = require('playwright');
const ExcelJS = require('exceljs');
const fs = require('fs');
const path = require('path');
const TTFB_THRESHOLD_MS = 1000;
const ATTEMPTS = 5;
const CONCURRENCY = 10;
@AronNovak
AronNovak / find_dupicates.sh
Created January 16, 2026 08:00
Checking for identical files within a patch file
#!/bin/bash
PATCH_FILE="${1:-full_diff.patch}"
# Extract filenames from the patch
grep -a "^diff --git" "$PATCH_FILE" | sed 's|diff --git a/.* b/||' | sort -u > /tmp/patch_files.txt
echo "=== Duplicate File Report ==="
echo "Patch: $PATCH_FILE"
echo "Total files in patch: $(wc -l < /tmp/patch_files.txt)"
#!/bin/bash
# Script to find Dockerfiles that install amd64 packages without arm64 equivalents
# This indicates potential Apple Silicon compatibility issues
echo "Scanning for problematic Dockerfiles (AMD64 without ARM64 support)..."
echo "==============================================================="
FOUND_ISSUES=0
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:ListAccessPointsForObjectLambda",
"s3:GetAccessPoint",
"s3:PutAccountPublicAccessBlock",
@AronNovak
AronNovak / nginx-azure-web-apps.conf
Created June 16, 2023 04:23
Ngnix config for Azure Web Apps + Drupal 9 site
server {
#proxy_cache cache;
#proxy_cache_valid 200 1s;
listen 8080;
listen [::]:8080;
root /home/site/wwwroot/web;
index index.php index.html index.htm;
server_name example.com www.example.com;
port_in_redirect off;
@AronNovak
AronNovak / Hierarchical book structure - Drupal 9 sample.php
Last active December 12, 2022 14:26
Programmatic hierarchical book structure
<?php
// Create seven nodes, put them in a book tree structure.
// A
// |- B
// | |- C
// | |- D
// |- E
// |- F
// |- G
@AronNovak
AronNovak / entityreference-devel-generate-speedup.patch
Created August 22, 2022 12:48
Drupal 7 EntityReference Devel Generate speedup
diff --git a/entityreference.devel_generate.inc b/entityreference.devel_generate.inc
index fab46dd..d6d7d78 100644
--- a/entityreference.devel_generate.inc
+++ b/entityreference.devel_generate.inc
@@ -15,18 +15,20 @@ function entityreference_devel_generate($object, $field, $instance, $bundle) {
}
function _entityreference_devel_generate($object, $field, $instance, $bundle) {
- $object_field = array();
- // Get all the entity that are referencable here.
@AronNovak
AronNovak / file_cleanup.php
Created February 21, 2022 09:07
Drupal 9 - unused / unmanaged unsupervised file cleanup script.
<?php
/**
* @file
* File cleanup script, to be executed after the migration.
*
* Invocation:
* ddev drush scr web/modules/custom/server_migrate/file_cleanup.php .
*/
@AronNovak
AronNovak / markdown-to-email
Last active December 3, 2021 10:13 — forked from rtulke/markdown-to-email
markdown-to-emailA simple script to send beautifully formatted emails that you write in Markdown. The email will have an HTML payload and a plain-text alternative, so you'll make everyone happy, including yourself. With added table support.
#!/usr/bin/env python
'''
Send an multipart email with HTML and plain text alternatives. The message
should be constructed as a plain-text file of the following format:
From: Your Name <your@email.com>
To: Recipient One <recipient@to.com>
Subject: Your subject line
---