Easy and effective ways for programmers’ websites to earn money

When you have work as a software developer, you will encounter many problems that you spend quite some time solving. For example, if you are looking to setup a Raspberry Pi web server to host your PHP application, you may take hours.

On the other hand, you may spend time in finding the parts needed to build a camera prototype that take pictures at the push of a button.

As I had said in why should programmers blog, blogging enables you to revisit your past solutions to solve current problems.

In addition, when you had written a good number of articles, the Internet will probably reward you with substantial viewership.

At this point in time, you may probably think of ways to earn some money to pay the running costs of your website.

So what are some easy and effective ways for programmers’ websites to earn money? In case you are a programmer who owns a website, here are some easy and effective ways to earn money.

How to detect keyboard presses made to the browser screen with JavaScript

When you are building a browser-based game, being able to track key presses is helpful.

For this purpose, you can register a JavaScript function that gets called when the browser detects a key is being pressed.

After the browser detects a key press, it will send information about the key to your function.

When your function is able to get the key that is pressed, it can then use this information to update the game state.

In this post, let’s look at how we can detect keyboard presses made to the browser screen with JavaScript.

How to control a SG90 servo motor with the ESP8266 NodeMCU LUA Development Board

When you are looking to operate remote-controlled or radio-controlled toy cars, robots and airplanes, you will need to use servo motors.

Since the ESP8266 NodeMCU LUA Development Board is cost efficient for IOT solutions, it can be used for controlling servo motors.

So how can we control a servo motor with the ESP8266 NodeMCU LUA Development Board?

This post discusses how we can control the SG90 servo motor, with the ESP8266 NodeMCU LUA Development Board.

Making sure that the password of your user account does not expire on Windows 10 IoT

Once upon a time, I was developing an IoT prototype on a Windows 10 IoT device that does not have any display port. Therefore, the only way to work with that device is to use Microsoft Remote Desktop. After using it for some time, I switched to another Raspberry Pi project of higher priority.

When I came back to this Windows based device, the password of the user account had expired. As a result of that, Windows Remote Desktop Connection Manager denied access to the device. Since that was the only user account for me to access the device, I had to start all over again with another device.

After this incident, I make it a point to configure my user account with a password that never expires.

In order to have a reference in the future, I created this post to document the steps to do so on Windows 10 IoT.

How to host a static website on your Raspberry Pi Zero W with Raspbian Stretch Lite and Nginx web server

After you capture the Northern Lights with an entry level DSLR, you may want include them in your personal portfolio. Until you find the time to setup a content management system for your personal portfolio, you want to keep it as a static website.

At this point in time, you saw that Raspberry Pi Zero W and cover lying on the table. In addition to that, you have a spare micro USB charger that you used for charging your old Android phone.

Since you do not have any other use for these items, you decided to host your personal portfolio on that Raspberry Pi Zero W.

With this intention, this is how you can host a static website on your Raspberry Pi Zero W with Raspbian Stretch Lite and Nginx web server.

Getting the environment variables supplied to your Cloud Foundry application with Python 3 Flask

When I was trying to build a Python 3 Flask application on Cloud Foundry, I wanted to quickly check the environment variables that Cloud Foundry will supply to my application.

As a result of that, I created a Python 3 Flask application that will probe the environment variables that it receives from Cloud Foundry.

This post lists the files that constitute that Python 3 Flask application.

How to setup a Raspberry Pi web server with Raspbian Stretch Lite, Nginx, MariaDB and PHP as the LEMP stack

Raspberry Pi LEMP Linux Nginx MariaDB PHP

When you want to deploy a PHP application that you wrote, you can first deploy it on a Raspberry Pi. Once your PHP application gets enough traction, you can then port it over to a computer with more horsepower.

When your PHP application employs MySQL or MariaDB as the backing database, we can put it up on a LEMP stack. In this situation, HTTP requests will first be directed to the Nginx reverse proxy server. Whenever the request is made to a php application, Nginx will then pass it on to the PHP7 Fast CGI Process Manager (PHP FPM) for generating the HTTP response.

Given these points, this post provides the steps to setup a Raspberry Pi web server with Raspbian Stretch Lite, Nginx, MariaDB and PHP as the LEMP stack.

How to enable VNC server on Raspbian Stretch with raspi-config

When you have a VNC server enabled on your Raspbian Stretch, you will be able to access your Raspberry Pi from another computer. Furthermore, you will be able to use your Raspberry Pi from a graphical user interface.

Therefore, if you want to enable SSH server on your Raspbian Stretch but is not really comfortable with a command line interface, a VNC server is what you should enable instead.

In such a situation, you can use raspi-config to enable VNC server on Raspbian Stretch. Let see how we can do so.