Skip to content

u/Epse

In this archive from Aug 2016 to Jul 2025

5
posts
40
comments
2
media
216
score

DomPDF seemed to be the most functional one when I looked at it, but it supported a fairly arbitrary subset of HTML and CSS, and page numbers were very hard to get right, and properly splitting a table across pages ended up needing me to estimate the amount of rows per page in php and manually doing splitting

The most reliable option is spinning up a headless chrome and doing print to pdf from there but that's just depressing to me

Knowledge is at least 2 years old at this point tbh could be things have vastly improved

2 points

I've recently switched to manually writing an openapi doc (really not that hard) and treating it as the source of truth spec that gets collaborated on between backend people and app people. If something doesn't work, it's then quite clear whose bug it is. Works well, I prefer it over auto generated

3 points

MariaDB/MYSQL has some oddities which really annoy the crap out of me, the latest one for me being not having a datetime with timezone column (making every query a pain)

1 points

I just tried sail mysql (previously I had run sail shell and then mysql from there) and it worked just fine.

Stuff like sail artisan migrate returns the following SQLSTATE[HY000] [2002] Connection timed out (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

1 points

Yeah that would be correct, it's how the docker network works. That bit is also created by the Sail system. Root user has no password in Sail by default, the MySQL option to allow that is set

2 points

It is in fact running, I can connect to it from my host.

Docker-compose for reference:

# For more information: https://laravel.com/docs/sail
version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.0
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.0/app
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
            # - pgsql
            - redis
            # - selenium
    # selenium:
    #     image: 'selenium/standalone-chrome'
    #     volumes:
    #         - '/dev/shm:/dev/shm'
    #     networks:
    #         - sail
    mysql:
        image: 'mysql:8.0'
        ports:
            - '3306:3306'
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        volumes:
            - 'sailmysql:/var/lib/mysql'
        networks:
            - sail
        healthcheck:
          test: ["CMD", "mysqladmin", "ping"]
#    pgsql:
#        image: postgres:13
#        ports:
#            - '${FORWARD_DB_PORT:-5432}:5432'
#        environment:
#            PGPASSWORD: '${DB_PASSWORD:-secret}'
#            POSTGRES_DB: '${DB_DATABASE}'
#            POSTGRES_USER: '${DB_USERNAME}'
#            POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
#        volumes:
#            - 'sailpostgresql:/var/lib/postgresql/data'
#        networks:
#            - sail
#        healthcheck:
#          test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
    redis:
        image: 'redis:alpine'
        ports:
            - '${FORWARD_REDIS_PORT:-6379}:6379'
        volumes:
            - 'sailredis:/data'
        networks:
            - sail
        healthcheck:
          test: ["CMD", "redis-cli", "ping"]
    # memcached:
    #     image: 'memcached:alpine'
    #     ports:
    #         - '11211:11211'
    #     networks:
    #         - sail
    mailhog:
        image: 'mailhog/mailhog:latest'
        ports:
            - '${FORWARD_MAILHOG_PORT:-1025}:1025'
            - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
        networks:
            - sail
networks:
    sail:
        driver: bridge
volumes:
    sailmysql:
        driver: local
#    sailpostgresql:
#        driver: local
    sailredis:
        driver: local
1 points

Honest question, why does "more modern" matter for you? I get the icons part, but I'd rather rely on ls because that has been thoroughly tested and handles every edge case properly. And there are plenty of edge cases when a filename can consist of any byte sequence it wants.

4 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.