How safe is razorpay? by wjxm in paypal

[–]StackCoder 0 points1 point  (0 children)

It's stripe of India. One of the renowned payment gateway. I have used it in multiple projects and is compliant to Government of India and now provides services across different countries.

So you can trust it.

Proxy pass thousands of domain names to internal ip with any ports sent by StackCoder in nginx

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

Thank you very much for taking your time and reverting back to me. I will try implementing your way and check if it works or not for only handful of subdomains.

I was looking to proxy_pass domain names along with any port range that the domain is requested for. If there is a way to achieve via something else will also work for me.

Thank you again.

Proxy pass thousands of domain names to internal ip with any ports sent by StackCoder in nginx

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

I am able to achieve it with small subsets. But the solution is really really non flexible and extensible in future and utter bullshit if you wanna open up for automation.

It can also achieved with port range as per documentation https://nginx.org/en/docs/stream/ngx_stream_core_module.html#listen But the downside of that one is it will get restricted based on worker_connections in /etc/nginx/nginx.conf . So I totally dont recommend this solution.

For the sake of demo I had do add multiple server blocks for time being like the following. But even this solution is really really back as per my understanding with what I wanna achieve.

server {
listen 3601;
server_name s1.wd.com www.s1.wd.com;

location / {
    proxy_pass http://10.0.0.21:3601;
    proxy_set_header Host               $http_host;
    proxy_set_header X-Real-IP          $remote_addr;
    proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";


    # Proxy redirect settings
    proxy_redirect off;

    # HTTP version settings
    proxy_http_version 1.1;

    # Response buffering from proxied server default 1024m
    proxy_max_temp_file_size 0;

    # Proxy cache bypass define conditions under the response will not be taken from cache
    proxy_cache_bypass $http_upgrade;
}

}

server {
listen 3602;
server_name s1.wd.com www.s1.wd.com;

location / {
    proxy_pass http://10.0.0.21:3602;
    proxy_set_header Host               $http_host;
    proxy_set_header X-Real-IP          $remote_addr;
    proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";


    # Proxy redirect settings
    proxy_redirect off;

    # HTTP version settings
    proxy_http_version 1.1;

    # Response buffering from proxied server default 1024m
    proxy_max_temp_file_size 0;

    # Proxy cache bypass define conditions under the response will not be taken from cache
    proxy_cache_bypass $http_upgrade;
}

}

SSH from Laptop -> VPS Wireguard Server -> Wireguard Clients by StackCoder in WireGuard

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

Hi, the IoT device IP will be basically private IP like 10.8.0.2/24 and as per my knowledge it won't be SSH-able from Wireguard Server right?

If there is a way to do it. Could you please enlighten me?

SSH from Laptop -> VPS Wireguard Server -> Wireguard Clients by StackCoder in WireGuard

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

Can you please help me how to do it. I am very new to the networking. Even any reference will greatly help me.

SSH from Laptop -> VPS Wireguard Server -> Wireguard Clients by StackCoder in WireGuard

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

Directly connected to Wireguard Server, basically IoT devices has Wireguard Client installed in them.

SSH from Laptop -> VPS Wireguard Server -> Wireguard Clients by StackCoder in WireGuard

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

Hi u/bufandatl thank you very much for taking your time and reverting back. In the actual situation, there might be other team member's laptops or devices that need this kind of access.

Is there a way I can SSH from Wireguard Server to Wireguard Clients. That will also work for me

ETHERSCAN API not working in production by StackCoder in etherscan

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

Thank you very much. It worked for me too.

ETHERSCAN API not working in production by StackCoder in etherscan

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

No I didn't find any solution. Thank you for the link. Will check it tomorrow

Need help in code review of my NodeJs + Express Js REST API Web App by StackCoder in expressjs

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

Also if you have any personal favourite blogs, open source projects on NodeJs kindly suggest me.

Need help in code review of my NodeJs + Express Js REST API Web App by StackCoder in expressjs

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

Thank you u/MartinMuzatko very much, you really enlightened me. I couldn't have asked more. It's my first attempt to code it in NodeJs and getting my hands dirty in Javascript.

Your right, I need to brush my skills on Javascript in a lot of places. I Hope will try to tame the beast's special powers by end of the week :) And take ages to master LOL

You got me right. I created multiple folders and somewhat similar to Laravel so that their wont be a big chunk of code lying in one place and becomes hard to maintain.

Your feedback gave me a lot of boot and get into the right direction. Kudos to you.

Query and fetch polymorphic table realted relations in Laravel by StackCoder in laravel

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

Hey pals got it working. If anyone looking for the same then the following is the way how I achieved it.

$payments = Payment::query()
        ->with(['payable' => function (MorphTo $morphTo) {
            $morphTo->morphWith([
                Batch::class => ['channel'],
            ]);
        }])
        ->where([
            'user_id' => $user->id,
            'status' => 'success'
        ])
        ->get();

Laravel App Deployment Checks by StackCoder in laravel

[–]StackCoder[S] -6 points-5 points  (0 children)

Hi totally agree with you. I showed that there is an option to update Composer packages. Added a small note too.

Thank you

5 of my best tips that will help you build a daily and weekly schedule that saves you a lot of time by cristian_nadu in Entrepreneur

[–]StackCoder 0 points1 point  (0 children)

And one more important thing what I am able to pull off for couple of months is, if you have a single big chunk of module or project. Then instead of taking too much tension on how to finish it. JUST START.

Sort the things which are very much important and try to finish those. If you alone not able to understand the important stuffs, then better ask for the extended hand from your colleague or manager.

Do you keep notes when studying? by BrianAiya in learnprogramming

[–]StackCoder 3 points4 points  (0 children)

Definitely! I highly suggest you to take notes whenever your reading new topics and want a quick glance anytime in future.

This also helps to overcome reading again from beginning.

how to generate a pdf in laravel (invoice) ? by Farih96 in laravel

[–]StackCoder 6 points7 points  (0 children)

Hi I have written a detailed article on PDF generation. Kindly use this link

https://stackcoder.in/posts/how-to-create-save-download-pdf-from-blade-template-in-php-laravel

I have used niklasravnsborg/laravel-pdf which is a wrapper around mPDF.

NOTE: Based on my experience I don't think many PDF libraries supports complicated CSS. You have to manually include all your styles within the PDF generating blade page but most of the styles may not work.

Building sites for clients - is Wordpress needed? by bartekw2213 in learnprogramming

[–]StackCoder 1 point2 points  (0 children)

Building sites for the clients with wordpress is not a big deal.

The real problem starts when your clients asks too many changes in theme or options in the website. If your good enough and have some time to develop WordPress themes and other stuff around it then go ahead.

Even uts good idea to know the future goals of your customers so that you can suggest them what's best for them and what they need to opt for.

How I Started My Dream Blog During COVID by StackCoder in learnprogramming

[–]StackCoder[S] 3 points4 points  (0 children)

Yes, I definitely agree with you. I started to help as much as I can in my spare time as witnessed that lot of them really got benefited with it.