Skip to content

Instantly share code, notes, and snippets.

@erral
erral / Mailhog Bash Script (systemd)
Last active December 17, 2024 13:43 — forked from bouassaba/Mailhog Bash Script (systemd)
Mailhog setup with systemd. Copy and paste this to a terminal in your computer. It will start a MailHog server listening on port 25 and a web based interface listening on port 8025
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
sudo wget --quiet -O /usr/local/bin/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
# Make it executable
sudo chmod +x /usr/local/bin/mailhog
@erral
erral / docker-compose.yml
Last active January 9, 2023 11:03
mysql eta adminer interfazea martxan jartzeko docker-compose.yml fitxategia
# copy this file to a folder and name it docker-compose.yml
# run the services with the following command:
#
# $ docker compose up
#
# You will have a mysql server running on 3306 and an adminer interface con 8081
#
# It will create a default databse called mydb and a username called mydb_user with password mydb_pass
# with permissions to manage the database
@erral
erral / jabetza-pribatutik-ezagutza-kolektibora.md
Last active September 28, 2022 07:50
Jabetza pribatutik ezagutza kolektibora: lizentziei buruzko mahaingurua
@erral
erral / index.md
Last active October 13, 2022 04:22
How to deploy Volto sites automatically in non-docker scenarios
#! /usr/bin/env python
# -*- coding: utf-8 -*-
""" install pdftoppm first (use your package manager) """
import os
def main(start="."):
for dirpath, dirnames, filenames in os.walk(start):
for filename in filenames:
if filename.endswith('pdf') and not filename.startswith('.') and f'{filename}.jpg' not in filenames:
os.system(f'pdftoppm -jpeg -f 1 -l 1 "{dirpath}/{filename}" > "{dirpath}/{filename}.jpg"')