Skip to content

Instantly share code, notes, and snippets.

View iurisilvio's full-sized avatar

Iuri de Silvio iurisilvio

View GitHub Profile
@autoize
autoize / 6977.diff
Created December 31, 2019 15:06
Pull request #6977 for Amazon SES API support in Mautic 2.15.3
diff --git a/app/bundles/EmailBundle/Assets/js/config.js b/app/bundles/EmailBundle/Assets/js/config.js
index f233d59f3f..5951c08143 100644
--- a/app/bundles/EmailBundle/Assets/js/config.js
+++ b/app/bundles/EmailBundle/Assets/js/config.js
@@ -66,6 +66,7 @@ Mautic.testMonitoredEmailServerConnection = function(mailbox) {
Mautic.testEmailServerConnection = function() {
var data = {
amazon_region: mQuery('#config_emailconfig_mailer_amazon_region').val(),
+ amazon_api_region: mQuery('#config_emailconfig_mailer_amazon_api_region').val(),
api_key: mQuery('#config_emailconfig_mailer_api_key').val(),
@jcrist
jcrist / bench.py
Last active January 27, 2025 21:01
A quick benchmark comparing msgspec (https://github.com/jcrist/msgspec), pydantic v1, and pydantic v2
"""A quick benchmark comparing the performance of:
- msgspec: https://github.com/jcrist/msgspec
- pydantic V1: https://docs.pydantic.dev/1.10/
- pydantic V2: https://docs.pydantic.dev/dev-v2/
The benchmark is modified from the one in the msgspec repo here:
https://github.com/jcrist/msgspec/blob/main/benchmarks/bench_validation.py
I make no claims that it's illustrative of all use cases. I wrote this up
@jbranchaud
jbranchaud / postgres-migrating-from-int-to-bigint.md
Created July 5, 2023 22:49
PostgreSQL: Migrating from INT to BIGINT
@mihow
mihow / image_from_url.py
Created September 11, 2023 23:10
Load image into PIL object from URL with streaming request, one line
import requests
from PIL import Image
image = Image.open(requests.get(url, stream=True).raw)