Skip to content

Instantly share code, notes, and snippets.

View Vlaaaaaaad's full-sized avatar

Vlad Ionescu Vlaaaaaaad

View GitHub Profile
@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.

@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
@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 June 25, 2023 19:41
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
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active April 28, 2024 11:47
List of expensive / long-term effect AWS IAM actions
route53domains:RegisterDomain
route53domains:RenewDomain
route53domains:TransferDomain
ec2:ModifyReservedInstances
ec2:PurchaseHostReservation
ec2:PurchaseReservedInstancesOffering
ec2:PurchaseScheduledInstances
rds:PurchaseReservedDBInstancesOffering
dynamodb:PurchaseReservedCapacityOfferings
s3:PutObjectRetention
@threepointone
threepointone / feature-flags-client-implementation.md
Last active June 1, 2023 18:35
Implementing a client for feature flags

On implementing a client for feature flags in your UI codebase

This document isn't an explainer on Feature Flags, you can find that with my amateur writeup, or literally hundreds of better writeups out there.

This document is also agnostic to the choice of service you'd use: LaunchDarkly or split.io or optimizely or whatever; that's orthogonal to this conversation.

Instead, this document is a list of considerations for implementing a client for using Feature Flags for User Interface development. Service providers usually give a simple fetch and use client and that's it; I contend that there's a lot more to care about. Let's dive in.

To encourage usage, we'd like for the developer experience to be as brutally simple as possible. So, this should be valid usage:

#!/bin/bash
# This is a script that unsubscribes an email address from AWS junk mail.
# If the script breaks it might be the magic numbers that needs to change.
# Send the form while tracing the request in your browser to find the new values.
# https://pages.awscloud.com/communication-preferences
unsubscribe_aws_email() {
curl "https://pages.awscloud.com/index.php/leadCapture/save2" \
-H "Accept: application/json" \
@ejlp12
ejlp12 / 1_ecs_note.md
Last active September 21, 2023 20:25
ECS Best Practices Notes
@darko-mesaros
darko-mesaros / lolbanner-function.fish
Created May 28, 2020 11:32
Lolbanner alias / function that shows some colorfull text
function lolbanner
echo
figlet -c -f ~/.local/share/fonts/figlet-fonts/3d.flf $argv | lolcat
echo
end