Skip to content

Instantly share code, notes, and snippets.

View Vlaaaaaaad's full-sized avatar

Vlad Ionescu Vlaaaaaaad

View GitHub Profile
@mbafford
mbafford / README.md
Last active March 26, 2025 16:45
Compare two PDFs using ImageMagick - provides a visual comaprison and a perceptual hash comparison (numerical)

PDF tools for comparing PDFs visually (overlaying two PDFs to see changed areas) and using a perceptual hash (numerical value indicating visual difference between the two files).

Useful for command line review of PDFs and de-duplication. Configure git to use these tools for better PDF history / comparison in git.

These scripts require imagemagick and poppler. Both installed from homebrew.


Setup git to use a custom diff using:

@timothyham
timothyham / ipv6guide.md
Last active December 4, 2025 16:38
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

Preface:

It is, unfortunately, extremely common for customers and enterprises operating in AWS to have chosen a workload/storage bearing account (more than likely, the main production account) as the Organization Management Account (formerly known Organization "Master" account, before AWS adopted better naming).
Many customers and companies operating in AWS made this decision in 2018 or so and its unforunately not something that can be easily changed as of 2024. Many customers have requests to AWS to make a friendly path for rehoming the Org Management account, but last I heard it is still not prioritized. Thus, we as customers are left to go through the nerve-wracking, if not dangerous process of migrating to a new AWS Organization in order to align with modern best practices and reduce common privilege escalation and account to account lateral movement concerns (made worse if you happen to have enabled things like Cloudformation Stacksets, Control Tower, or other powerful services in the same

@Burekasim
Burekasim / route53-price-update-april8th.csv
Last active March 12, 2024 17:51
a csv table of the new pricing for domain renewals
TLD renewal price until April 8th Renewal price starting April 8th Price difference in USD price difference in %
com $13.00 $14.00 $1.00 7.69%
net $11.00 $15.00 $4.00 36.36%
org $12.00 $14.00 $2.00 16.67%
furniture $47.00 $114.00 $67.00 142.55%
creditcard $141.00 $179.00 $38.00 26.95%
reviews $22.00 $57.00 $35.00 159.09%
careers $35.00 $66.00 $31.00 88.57%
fm $92.00 $121.00 $29.00 31.52%
@benkehoe
benkehoe / kms_random.md
Created April 28, 2023 14:45
Python random numbers from KMS.GenerateRandom

Python random numbers from KMS.GenerateRandom

Spurred by this twitter conversation. random.SystemRandom uses os.urandom as a source of bytes, but doesn't provide a way to use a different source of bytes. So stream_random.py is exactly that. Then kms_random.py has raw and buffered bytestreams pulling from KMS.GenerateRandom.

The main interface is kms_random.get_kms_random(boto3_session, buffer_size=None). The default buffer size is 16, chosen arbitrarily.

I do not vouch for the randomness properties of the results.

@charveey
charveey / 16-pihole-https.conf
Last active December 28, 2024 10:15
Configure Pi-hole SSL using Tailscale certificate & MagicDNS
/etc/lighttpd/conf-available/16-pihole-https.conf and symlink the file to "/etc/lighttpd/conf-enabled/" directory
# Ensure the Pi-hole Block Page knows that this is not a blocked domain
setenv.add-environment = ("fqdn" => "true")
# Enable the SSL certificate
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/combined.pem"
}
@ericmustin
ericmustin / example_ruby_traces.md
Created April 3, 2023 05:44
example ruby traces
gantt
dateFormat x
axisFormat %X:%L

title Trace 9a78cfeebd62a55a130068b0dbc01dc3

section Service emailservice
GET /return_order_deprecated :active, 1680500611600, 795ms
@am11
am11 / DotnetWithDeno.csproj
Last active March 4, 2025 13:54
.NET <-> Deno Interop
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmMainJSPath>myApp.js</WasmMainJSPath>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</Project>
@miketheman
miketheman / main.py
Last active December 22, 2022 19:20
Add a bunch of AWS Heroes (and some other folks, too) to a Mastodon list.
"""
Add users to a Mastodon instance list.
Uses https://mastodonpy.readthedocs.io/
"""
from os import environ
from pathlib import Path
from mastodon import Mastodon
from mastodon.errors import MastodonNotFoundError, MastodonServiceUnavailableError
@marcoarment
marcoarment / S3.php
Last active July 8, 2025 17:39
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights