Skip to content

Instantly share code, notes, and snippets.

@planetahuevo
planetahuevo / Listmonk-tutorial.md
Created April 8, 2026 15:02 — forked from MaximilianKohler/Listmonk-tutorial.md
Complete Listmonk setup guide. Step-by-step tutorial for installation and all basic functions. Amazon EC2 & SES

Listmonk setup and usage guide

When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.

I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.

There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides

@planetahuevo
planetahuevo / upload.php
Last active October 27, 2024 17:50 — forked from fowkswe/upload.php
Replacement for sendy's upload.php that sends files to S3 rather than the server.
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include('../functions.php');
include('../login/auth.php');
require_once('../helpers/S3.php');
if (!isset($_FILES['upload'])) {
die('No file uploaded');
@planetahuevo
planetahuevo / upload.php
Created October 27, 2024 17:49 — forked from alex-mungai/upload.php
Replacement for sendy's upload.php that sends files to S3 rather than the server.
<?php
//
// this replaces includes/create/upload.php - besure to save your old upload.php!
// you must put the S3.php file in includes/helpers/S3.php
// you can get it here:
// https://github.com/tpyo/amazon-s3-php-class
//
// This is an improvement on this gist:
// https://gist.github.com/Wysie/03934b6a79a715772abd
//
@planetahuevo
planetahuevo / gist:e3f2e69b61408e14f4de8fe1de9e43ca
Last active October 27, 2024 17:35 — forked from Wysie/gist:03934b6a79a715772abd
Upload to Amazon S3 Instead of Server for Sendy Email Image Uploads
//Using S3.php from https://github.com/tpyo/amazon-s3-php-class. Place it in includes/helpers
//Replaces Sendy's includes/create/upload.php
// for sendy 2.1.0.2
//Add in includes/config.php =>
// define('AWS_ACCESS_KEY', 'xxxx');
// define('AWS_SECRET_KEY', 'xxxx');
// define('S3_ENDPOINT', 's3.amazonaws.com');
// define('S3_BUCKET_NAME', 'xxxx');
<?php
@planetahuevo
planetahuevo / prueba-cert.php
Created July 24, 2024 14:41 — forked from joseconti/prueba-cert.php
Prueba nuevo certificado Redsys
<?php
$url_conexion = 'https://sis-t.redsys.es:25443';
$conexion = curl_init();
curl_setopt( $conexion, CURLOPT_URL, $url_conexion );
curl_setopt( $conexion, CURLOPT_CONNECTTIMEOUT, 10 );
curl_setopt( $conexion, CURLOPT_TIMEOUT, 60 );
curl_setopt( $conexion, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $conexion, CURLOPT_POST, true );
// CURLOPT_SSL_VERIFYPEER indica a cURL que valide la cadena de certificados del servidor con los certificados raíz del almacén local
@planetahuevo
planetahuevo / cloudflare-purge-cache-service-worker.js
Last active October 29, 2023 13:24 — forked from vdbelt/cloudflare-purge-cache-service-worker.js
A CloudFlare service worker that proxies purge cache requests. Example: https://example.com/__purge_cache?zone=XX
addEventListener('fetch', event => {
event.respondWith(purgeCache(event.request))
})
async function purgeCache(request) {
const url = new URL(request.url)
@planetahuevo
planetahuevo / 0-README.md
Created September 11, 2023 19:14 — forked from Overbryd/0-README.md
Cloudflare Fragment Caching

Cloudflare fragment rendering/caching

This worker script will evaluate your origin response, and replace html comments marked as fragment:key with a respective prefetch defined in a X-Fragments response header.

Usage

Your origin must include the X-Fragments header, specifying the a comma separated list of prefetch requests to make for that response.

< HTTP/1.1 200 OK
body {
background-image: url(https://live.staticflickr.com/65535/51705970602_9f5ec7b9a8_k.jpg);
background-size: 100% 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
transition: background .2s;
color:#fff;
}
@planetahuevo
planetahuevo / a_faster_load_textdomain.php
Created June 25, 2021 23:57 — forked from soderlind/a_faster_load_textdomain.php
A faster load_textdomain for WordPress
<?php
/*
Plugin Name: A faster load_textdomain
Version: 0.0.1
Description: While we're wating for https://core.trac.wordpress.org/ticket/32052.
Author: Per Soderlind
Author URI: https://soderlind.no
Plugin URI: https://gist.github.com/soderlind/610a9b24dbf95a678c3e
License: GPL
@planetahuevo
planetahuevo / Stackedit.md
Created April 19, 2021 23:50 — forked from nztim/Stackedit.md
Install StackEdit on Ubuntu 14.04

###Install Node and Bower

  • Set up the NodeSource repo and install Node
  • curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
  • sudo apt-get install nodejs
  • Install bower: sudo npm install -g bower

Install StackEdit

  • Clone the repo: git clone https://github.com/benweet/stackedit
  • To use a domain other than 'localhost', edit /public/res/constants.js:
  • constants.BASE_URL = "http://stackedit.dev:3000/";