Categories
CMS Magento Mastering Development

Magento 2 Varnish issue with images

Last days was trying to investigate why my magento 2.3.5p1 instance needed for uncached pages about 10-11 secs to load, measured with timer. I identified that the issues was Porto’s template mega menu which for some reason when it rendered in layout needed about 6-7 secs. I found it with magento profiler. So after removed […]

Categories
Mastering Development System & Network

Redirecting Traffic to local mqtt server

I am really confuse about how to redirect. I have 2 WLANs, one use to connect to the router(wln0) and one the I use as AP(wlan1). My aim is to redirect traffic from one client connected to the AP that connecting to remote mqtt server to my local mqtt server. I have tried those rules […]

Categories
Mastering Development System & Network

Keep track of time spent remotely via SSH / MoSh and Tmux

Is there a way to keep track of the time spent on remote sessions? I would like to know how many hours I’ve been connected through SSH and MoSh to my server. Alternatively, what could be a good way to track only attached sessions? I’ve been using only MoSh+tmux since May. Running last return this: […]

Categories
Mastering Development System & Network

Exclude location from NGINX rate limiting

I have both limit_req_zone and limit_req defined in the http block of nginx so it will apply to all server and location blocks. Is there a way to exclude a certain location or server block from that limit? nginx.conf: http { … limit_req_zone $binary_remote_addr zone=main:10m rate=25r/s; limit_req zone=main burst=100 nodelay; limit_req_status 429; … } myserver.conf: […]

Categories
Mastering Development System & Network

Forwarded Packets are received by namespace’s veth0 but not received by application

I use libtins (It uses Pcap) to capture link layer packets and forward to a network namespace where the actual application runs on. Client(Browser) -> Server -> Pcap -> Pcap Send -> br0 (Bridge) -> Namespace -> Application Now, I see that the packets are forwarded and visible on Tcpdump snapshot but I don’t see […]

Categories
CMS Mastering Development Wordpress

What is wrong with this piece of PHP code? This is for an email template. (I am completely new to PHP)

I am trying to make an email template with PHP on WordPress. <p><?php esc_html_e( ‘We have finished processing your order.’, ‘woocommerce’ ); ?></p> The above piece of code works just fine. However when I replace it with multiple lines such as: <p><?php esc_html_e( ‘Your order has been delivered.’, ‘woocommerce’); ?></p> <?php <p><?php esc_html_e( ‘We sincerely […]

Categories
CMS Mastering Development Wordpress

How to update the WooCommerce cart Icon to show new products added with JavaScript

I created some custom links to add new products to the cart using the "href" attribute, my code looks like this. <a class="line1" id="btn2" href="?add-to-cart=5207">Example</a> But I didn’t like the fact that every time I added a product it refreshed the whole page so I started looking for a different approach, and I found a […]

Categories
Mastering Development Software

Get Data from an API at certain intrevals and format to a JSON file

As a summer project, I’m creating (or trying to create) a website/script which provides info about an ongoing event in a game. I want to ping the API during the event every hour in a certain interval (eg: 18:00 to 00:00) during the event (which I can also get the start and finish date from […]

Categories
Mastering Development Software

When porting something large and disorganized from .NET Framework to .NET Standard with haste, when should you “slow down” and reinvent the wheel?

I’m working at a new-ish job, and I’ve developed the backbone of a new piece of software we’re going to use for our infrastructure. Let’s call this ABC. Some time ago, my boss asked me and one other guy to use it to build a prototype for an actual upcoming use case for this infrastructure. […]

Categories
Apple User Help

Partition showing all FFFF after Partioining and computer not booting

You all that answer questions are SO amazing! Thank you for your very valuable time. I’ve seen other similar questions about this and the answer seems to be computer /HD specific and I don’t know how to figure out the numbers. I know it requires gpt add etc. I had previously installed Windows successfully (ish, […]