How Do You Determine the GitHub Enterprise URL for the API Endpoint?

Problem scenario
You want to run some curl commands to invoke a GitHub Enterprise URL. You tried using “https://api.github.foobar.com/…”, but you get a message about the URL not resolving. How can you find out what the API endpoint is?

Possible Solution
Try “https://github.foobar.com/api/v3/…” instead. Although Github.com uses the “api” immediately after the “https://” constructor (and to the left of the “github…” section),

How Do You Write a Python Program to Find if The “Read more” Preview on a Web Page is Visible for Every Web Page Previewed?

Problem scenario
Sometimes the “Read more” or “Continue reading” hyperlink in the page preview of your website (e.g., when you search for a word), is not visible. You know that some of your web page previews on your website don’t have the “Read more” hyperlink at the end. This makes the preview appear to have the entire web page. You need to identify the postings that don’t have the “Read more.” How do you use Python to find the pages that have previews that have no “Read more” hyperlink?

What Happens Technically when Someone Opens a Web Browser and Goes to a Website?

Question
Surfing the World Wide Web happens as a part of everyday life. In a job interview, you are asked to describe what happens behind the scenes when you open a web browser and enter a URL. The hiring manager wants to hear your knowledge of assembling packets of PHP, JavaScript, HTML, networking, or other technologies involved and how the sequence proceeds. What are the details of what happens behind-the-scenes?

How Do You Harden a Website Application?

Problem scenario
You want to ensure you web application is protected from buffer overflows, injection attacks and other vulnerabilities that could reveal sensitive information. How do you harden a website application and follow security recommended practices?

Possible Solution #1
Endeavor to prevent injection attacks. Minify the website application by not allowing file uploads and limit POST requests to 2 MB (page 28 of Node.js Security by Liran Tal).

How Do You Fix a memcached.so Error when Running PHP Too?

Problem scenario
You get an error about memcache and you are running PHP. Or you get an error “Unable to load dynamic library “memcached.so”? You run “php –version” and you see an error about memcache or memcached (e.g., a missing memcached.so file). What should you do?

Possible Solution #1
Get a memcached.so file from a working Linux server and place it in the directory that the error message showed in the php –version command.

How Do You Get Python to Search a Web Page for a Specific Pattern?

Problem scenario
How do you write a Python 3 program to parse the text of a web page and determine if a string is on the web page or not?

Solution
Change the “yoururl” variable assignment and the “searchterm” assignment below to what you desire. Then run the program below:

import re
import requests
yoururl = ‘https://www.continualintegration.com/’
searchterm = “learned”
r = requests.get(yoururl)
found = re.search(searchterm, …

How Do You Configure Nginx to Listen to Messages Sent via HTTP?

Problem scenario
You have Nginx configured. The access logs never pick up any POST message content. You get 405 error messages. What do you do?

Solution
This will send a message payload — but not via POST. It may not work for your situation. To get a message to be sent to a website (a listening web service), craft a URL that does not necessarily exist,

How Do You Troubleshoot Two WordPress Websites when You Expect There to Be Only One?

Problem scenario
You seem to have two versions of a website being hosted. When you log into WordPress and make changes, they aren’t taking effect. You notice that the website you have is duplicated with one older version and one newer version. Both are hosted. You use a VPN or proxy tunnel website and find differences in your website. You want to consolidate these. How do you find out what is going on?

How Do You Get a footer.php File to Have a Change Apply in WordPress?

Problem scenario
You clicked “Update file” after you made changes to a .php file in WordPress (via the Theme Editor). You have refreshed the web page, but the changes have not taken effect. What should you do?

Possible Solution #1
Can you update the theme? If the theme has an update waiting, getting it updated can fix this problem.

Possible Solution #2
Clear the history of your web browser.