Categories
CMS Mastering Development Wordpress

How do I optimize a wordpress marketplace for 100k products & 5k visitors/day?

Would love some opinions on whether or not one could scale up a marketplace with wordpress and if it’s worth pursuing this option. My target is to be able to run smooth with 100 000 products, 5k visitors/day with perhaps 50-100 active users in the same time. We’ve got woocommerce to convert the site to […]

Categories
CMS Mastering Development Wordpress

Own product-type template

I have a customized product type called exploded. In the first time (default) Woocommerce get the simple product template. Now I want my own template for my customized product type. I did some research and wrote this code below if ( ! function_exists( ‘woocommerce_exploded_add_to_cart’ ) ) { function woocommerce_exploded_add_to_cart() { global $product; wc_get_template( dirname( __FILE__ […]

Categories
Mastering Development System & Network

Mac OS pf redirect error cksum incorrect

Scenario Server A – 192.168.43.215 – listens on port 4000 Client B – 192.168.43.207 – Mac OS 10.14.6 I want: connection to B at localhost:8080 —> A:4000 ex: following command on B’s terminal should reach A telnet localhost 8080 Config On client B: Turn on Mac OS forwarding pf settings: rdr proto tcp to any […]

Categories
Mastering Development System & Network

How to capture UDP traffic so it can be piped to grep

I’m trying to capture UDP traffic which is being sent as StatsD metrics (on port 8125). The most simple approach I tried is to run nc -ul 8125 which prints the metrics to the terminal…but they are not newline separated. Additionally, piping the output to grep doesn’t display anything. The next approach I tried was […]

Categories
Mastering Development System & Network

How to compress multiple directories from find list to separately files in unique folders?

How I can compress files in this scenario: I have folder structure like this: User1: /home/user1/websites/website1 /home/user1/websites/website2 User2: /home/user2/websites/website1 /home/user2/websites/website2 /home/user2/websites/website3 And I try now (need) to do backup like this: Folders for backups per user: /backup/date/websites/user1/ /backup/date/websites/user1/ And I need backup tar in user directory separately per website like this: /backup/date/websites/user1/website1.tar.gz /backup/date/websites/user1/website2.tar.gz /backup/date/websites/user2/website1.tar.gz /backup/date/websites/user2/website2.tar.gz […]

Categories
Mastering Development System & Network

possible to set up GCS bucket lifecycle rule to archive rarely used objects?

GCS offers lifecycle management where you can, for example, “Downgrade the storage class of objects older than 365 days to Coldline Storage”. I’d like to archive rarely used objects but keep frequently used objects in standard (hot) storage. Does anyone know of a way to do that? Ideally there would be a parameter like days-since-last-access, […]

Categories
Mastering Development System & Network

Server recommendations for application API [duplicate]

I currently have an application (API) hosted on a small server 1 GB RAM, 1 vCPU (Digital Ocean), the application read/writes to a MYSQL database which is also hosted on the same server. I expect that the server will receive a huge POST requests soon, nearly 50K request per hour. So the questions are, What […]

Categories
Mastering Development System & Network

Trying to access Dockerized nginx site causes a 301 redirect that removes the port

here is my server block: server { listen 443 ssl; ssl_certificate /certs/xxx.crt; ssl_certificate_key /certs/xxx.rsa; location = / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } } It is an Nginx Docker image that I access via https://host:5001. What happens when I go to the site is I get a 301 redirect and […]

Categories
Mastering Development System & Network

Extract OU name using Powershell’s Get-ADOrganizationUnit & Get-ADComputer

I want to get a list of servers on our Active Directory, I also want to include their IP, OS and what Organization Unit they belong to. It is the direct parent OU from which my servers belong to I came up with the following PS script and it almost satisfies what I need: > […]

Categories
Mastering Development

Reusing same docker container in PyCharm for multiple runs and debugs

I am trying to reuse the same interpreter in an existing container for my run and for my debug, at the same time. This is what I see from here: https://www.jetbrains.com/help/pycharm/using-docker-as-a-remote-interpreter.html It is not clear if it is just an advisory or a limitation. If former, how do I override this behavior? I am using […]