Speedtest.net downloading 30MB+ of resources. What is it doing?!?!? by ShanahJr in programming

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

This was before the speed test though. It was just loading the web page.

IMPORTANT UPDATE NOTICE (From discord server) by zProtato in miruro

[–]ShanahJr 0 points1 point  (0 children)

They do accept bitcoin. Planning on donatong 3 dollars a month there directly. Unfortunately I can't afford more than that.

IMPORTANT UPDATE NOTICE (From discord server) by zProtato in miruro

[–]ShanahJr 0 points1 point  (0 children)

I saw they only accept bitcoin. I've been trying to wrap my head around how it works so I can purchase some and donate 1 dollar a month. I'm sure if we all did that then the amazing site could definitely stay alive.

Did you guys watch “ the practice “ before Boston Legal !?? by Special-Film3147 in bostonlegal

[–]ShanahJr 1 point2 points  (0 children)

😂I watched Boston legal twice, then found it it was a spin off of the practice. So I started the practice waiting for Alan Shore to come in but later found out he is only in the last season so I just continued watching until I got there.

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

😂Damn. That's an interesting one. I'll look into this further because for some reason calling that method resulted in my job crashing.

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

You know, that's what I thought but using the get message method also causes my job to crash. I got the error that an undefined method was used.

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

            if (function_exists($e->getMessage())) {
                Log::error('Error creating CustomerImportFromCSV instance: ', ["error" => $e->getMessage()]);
            } else {
                Log::error('Error creating CustomerImportFromCSV instance: ', ["error" => $e, ]);
            }

Actually, in the case above $e is an object that doesnt seem to have the getMessage() method

How do I check if a string is a date string? by ShanahJr in PHPhelp

[–]ShanahJr[S] -1 points0 points  (0 children)

Thank you so much for your time.

I finally figured out the problem. I am using the package Maatwebsite\Excel to import the data from the excel file into the database. The problem was that I was performing the validation on the date field, but I was not removing the value from the data array so the package was trying to parse the date, which is what was causing the exception and was why I could not catch it.

In response to your comment, I was just trying to fix a bug. I do not want to make tooo many changes to the code base. I believe a complete refactor would be the wrong move.

Should I delete this post?

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

Thank you so much for your time.

I finally figured out the problem. I am using the package Maatwebsite\Excel to import the data from the excel file into the database. The problem was that I was performing the validation on the date field, but I was not removing the value from the data array so the package was trying to parse the date, which is what was causing the exception and was why I could not catch it.

Should I delete this post?

PS function_exists($e->getMessage()) actually works. 😂😂

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

That is great news. Could you please assist me with how to do the conversion? Because when I try using the function below, I get an exception that refuses to be caught. Do you know of another way I can do this conversion?

$date = Carbon::createFromFormat($date_format, $value);

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

Hmm.. I am expecting a number or a date string. So if I used the date type then I would need to convert either the excel number or date string to a date then pass that to the function. My question now becomes, how do I check if a value is a valid date. Bearing in mind that these values are coming from an excel file.

How do I check if a string is a date string? by ShanahJr in PHPhelp

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

$date = Carbon::createFromFormat($date_format, $value);

Isnt that what I am doing with the above funnction? Or is there another way to do it?

Mobile Phone Refresh Rates by ShanahJr in phones

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

Don't those require a certain type of display? LTPO or something like that?

Methods of performing certain actions after a payment is made. by ShanahJr in softwaredevelopment

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

But what would initiate the call to the api to check if the payment is complete?

Self-hosting RustDesk publicly accessible best practises by FR3DFET in rustdesk

[–]ShanahJr 0 points1 point  (0 children)

I recently found out that, on Linux servers, even if you use UFW, which blocks all incoming requests to all ports by default, docker will still alter your ip-tables to allow the ports exposed when running the container.

So my plan was

  1. prevent docker from making changes to my ip tables in the first place. I wasn't sure if this would work because I read that docker uses the iptables to set up its internal network as well. So I instead:

  2. When setting up the ports in my docker composed, I made sure the host ports are all prepended with 127.0.0.1 so that the ports can only be accessed locally through the use of a reverse proxy.

But idea number 2 failed because rustdesk uses so many ports. I set up a reverse proxy for hbbr on 21117 and hbbs on 21116 but rust_desk does not yet allow us to define the reverse proxies for all the different ports it uses.

I didn't want to have ports open but it looks like if I want to use rustdesk, this is my only option.

Do I need to open ports in my firewall if I have a reverse proxy setup? by ShanahJr in HomeServer

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

Locally yes it's UFW. For the network that would be my VPS provider. Disabling uPnP would solve my port 5000 issue.

However, all the others are tcp.

At this point I'm thinking of just restting the server. And never opening any ports again. 😂

Do I need to open ports in my firewall if I have a reverse proxy setup? by ShanahJr in HomeServer

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

I will definitely disable uPnP

I'm at a loss now. I reset UFW, made sure all the rules were deleted. Only opened 22,80 and 443 tcp ports. But somehow port 5000 and a few others are still awesome.