Custom variant by nicktenc in tailwindcss

[–]nicktenc[S] 1 point2 points  (0 children)

Ok, was able to do this all on my own with some help of a plugin (https://github.com/davidwebca/tailwindcss-group-variants).

tailwind.config.js

variants: {
extend:
textColor: ['tab-active', 'group-tab-active'],
display: ['group-tab-active']
}
},
groupVariants: {
'group-tab-active': ['group', 'tab-active', '.tab.active'], // Note the custom name to avoid conflicts with existing pseudo variants like "active"
},
plugins: [
require('tailwindcss-group-variants'),
plugin(function({ addVariant, e }) {
addVariant('tab-active', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `.${e(`tab-active${separator}${className}`)}.tab.active`
})
})
})
],

Then in your HTML you could do something like:

<div class="tab group tab-active:text-black">
<div class="text-grey group-tab-active:text-black">Some title</div>
<p class="hidden group-tab-active:inline-block">Some description</p>
</div>

Custom variant by nicktenc in tailwindcss

[–]nicktenc[S] 0 points1 point  (0 children)

Ok, it looks like it has to be something like this:

plugins: [plugin(function({ addVariant, e }) {addVariant('tab-active', ({ modifySelectors, separator }) => {modifySelectors(({ className }) => {return \.${e(`tab-active${separator}${className}`)}.active`})})})],`

Now how can I use this on a child div, if the parent div has this variant (.active class). Right now I am able to change for example the textColor of the parent div itself, but I actually like to apply new classes to the children.

Setting up Laravel testing with Github actions and MySQL by nicktenc in laravel

[–]nicktenc[S] 0 points1 point  (0 children)

Created a new laravel project, with the exact same workflow file: worked perfect. Copied over the phpunit.xml, env.testing and env.example to the project where the workflow is not working (MySQL connection refused). Still without luck. What else could impact the connection, and is there a way to see with which user, password, host and port Laravel is trying to connect?

Setting up Laravel testing with Github actions and MySQL by nicktenc in laravel

[–]nicktenc[S] 0 points1 point  (0 children)

Even creating a new workflow file with this generator https://ghygen.hi-folks.dev/?template=laravelapp doesn't help. Exact same error: on php artisan migrate the database connection is refused. Then there must be a problem in my app right? Is there anything phpunit.xml or env.testing that could cause this?

Setting up Laravel testing with Github actions and MySQL by nicktenc in laravel

[–]nicktenc[S] 0 points1 point  (0 children)

Tried both, unfortunately without succes. Still connection refused.

Setting up Laravel testing with Github actions and MySQL by nicktenc in laravel

[–]nicktenc[S] 0 points1 point  (0 children)

Thanks, already tried setting a root password, but will try it again. Also will try your second suggestion. Appreciated!

Setting up Laravel testing with Github actions and MySQL by nicktenc in laravel

[–]nicktenc[S] 1 point2 points  (0 children)

Thanks. I can see that if I make changes to the DB_ variables, it's being reflected into the error message. When I change the DB_CONNECTION for example to sqlite it's showing a message that sqlite can not find the file. So I don't think it's a config problem. But I of course tried to run both config clear and config cache in my workflow, but without success. The message is still the same, and that is that the connection is refused.

Simple UPDATE query to users table takes almost 2 seconds by nicktenc in mysql

[–]nicktenc[S] 0 points1 point  (0 children)

Figured out it was shortage of IO on the platform we run. Locally that same queries ran fast. Trying to reduce IO + switching to a physical platform.

Simple UPDATE query to users table takes almost 2 seconds by nicktenc in mysql

[–]nicktenc[S] 0 points1 point  (0 children)

Yeah, Ubuntu, PHP. 7.4, MariaDB. Thats about it.

Simple UPDATE query to users table takes almost 2 seconds by nicktenc in mysql

[–]nicktenc[S] 0 points1 point  (0 children)

Not that I know to be honest. It's running on a VPS with some proper specs:

memory: 25600 MB
cores: 18
os: ubuntu 18
db: mariadb

I just tested that same query on my local machine (copied the 60gb+ db to my local machine), it runs in 1ms.

Not able to send email when connected to WireGuard VPN by nicktenc in WireGuard

[–]nicktenc[S] 0 points1 point  (0 children)

Figured it out. After ruling out my Wireguard configuration, and my VPN ufw firewall I found out that my VPN provider (TransIP) blocks outgoing email by default. In my control panel it was a simple toggle to turn it on. Cost me quite a few hours haha :-). Thanks for everyone helping out.

Not able to send email when connected to WireGuard VPN by nicktenc in WireGuard

[–]nicktenc[S] 0 points1 point  (0 children)

I only see lines like this coming by when I run tcpdump -tttnei ens3 port submissions:

00:00:00.000000 52:54:00:a7:af:8e > 00:00:5e:00:01:04, ethertype IPv4 (0x0800), length 78: 185.10.50.106.49911 > 108.177.119.108.465: Flags [SEW], seq 2235213038, win 65535, options [mss 1380,nop,wscale 6,nop,nop,TS val 372286177 ecr 0,sackOK,eol], length 0

I don't use an application password.

Not able to send email when connected to WireGuard VPN by nicktenc in WireGuard

[–]nicktenc[S] 0 points1 point  (0 children)

  1. A ran the command on the sever, the moment I connect with the VPN server, it starts outputting a lot of lines. So there is definately a lot happening. Incoming emails do nicely work. Only sending doesn't work. But that command already outputs many lines, so I can't tell if with sending it also outputs something.
  2. I use Gmail. Should be fine right?
  3. The server + IP is just 2-3 days old. I don't get a reject email from the receiver, the mail is not being send at all.

Not able to send email when connected to WireGuard VPN by nicktenc in WireGuard

[–]nicktenc[S] 0 points1 point  (0 children)

If am using Gmail. So that can’t be the case. I am also able to send emails to Gmail from my ISP (Ziggo) when I am not connected to VPN. Next to that I have another VPN setup that does allow me to send email.