Tag archive for: software development

How I repaired one of my corrupted git repository on gogs git server

While trying to commit my codes to my Raspberry Pi gogs git server, I got a rejection:

 ! [remote rejected] master -> master (missing necessary objects)
error: failed to push some refs to 'http://192.168.1.115:3000/org/a-project.git'

In addition to that, I got a HTTP 500 when I try to view the repository details page via the dashboard.

Since I can view my other repositories on my gogs git server, something must be wrong with a-project.git.

Given that, here are the steps that I took to rectify the issue.

How to minimise payment fraud on your e-commerce store

If you are running an e-commerce store, then you can accept payments from your customers through a payment gateway.

When you accept payments on your e-commerce store, you will also want to reduce or even prevent payment fraud.

Indeed, payment fraud can have huge financial impact on your business.

Therefore, it is important for you to look at how you can minimise payment fraud on your e-commerce store.

Given that, let us explore how we can reduce payment fraud on our e-commerce stores.

How to use your Raspberry Pi for Python development

Since its inception, the Raspberry Pi had progressed by leaps and bounds. Indeed, one of the reasons why we want to get a Raspberry Pi is its versatility. Apart from the huge selection of hardware, there are many Python libraries for you to build Raspberry Pi applications.

If you want to build something out of a Raspberry Pi, then you will benefit from setting up one for Python development.

Even if you do not build Raspberry Pi projects for a living, setting up a Raspberry Pi Python developer machine can be useful. For example, you may be a Solutions Engineer who build proof of concepts for demo purposes. In this case, you can build your demos with Python and run them on your Raspberry Pi.

If you are thinking of using Raspberry Pi for Python development, then this post is a reference for you.

How to use Python 3 virtual environments to run Python 3 applications on your Raspberry Pi

Whenever I am working on a Python 3 project, I will always use a Python 3 virtual environment for running that project. Therefore, I tend to do the same when it comes to .

If you are looking to build Python 3 applications to run on your Pi, then you may find this article useful for you.

How to setup Raspbian Stretch on Raspberry Pi 3 for developing Python 3 applications

Previously, I had shared:

Although Raspbian Stretch Lite is ideal for running Python 3 applications on Raspberry Pis, it is not so handy for developing Python 3 applications.

For example, if you are building a Python application that interfaces with the GPIO ports and CSI camera of your Raspberry Pi 3, it is hard to test it out on Raspbian Stretch Lite.

Since Raspbian Stretch includes a desktop environment, it is more convenient for developing Python 3 applications for Raspberry Pi. With this purpose in mind, this is how to setup Raspbian Stretch on Raspberry Pi 3 for developing Python 3 applications.

How to use a Python 3 virtual environment in Windows 10

When you need each Python 3 application that you are building to run in its own isolated environment, you can turn to virtual environments.

Since Python is available on Windows 10, you can also use virtual environments on Windows 10.

Typically, using a Python 3 virtual environment in Windows 10 involves the following steps:

  1. Installing Python 3 with pip and several features.
  2. Creating a Python 3 virtual environment with Python 3 venv module.
  3. Activating the Python 3 virtual environment.
  4. Installing Python 3 packages that your Python application is using into the virtual environment.
  5. Running your Python 3 application within the Python 3 virtual environment.
  6. Deactivating the Python 3 virtual environment.

How to set environment variables for your Python application from PyCharm

The Twelve-Factor App methodology recommends storing configurations in the environment.

When you follow this methodology and want to run your Python application from PyCharm, you need to create a customised run configuration.

In case you need it, this post shows how to set environment variables for your Python application from PyCharm.

How to associate a virtual environment with a Python project in PyCharm

When it comes to Python development, PyCharm is my favourite IDE.

Before working on a new Python project, I like to create a virtual environment and associate it with the corresponding PyCharm project. In case you like this mode of operation, this is how you can associate a virtual environment with a Python project in PyCharm.

How to setup Codiad Web IDE on your Raspberry Pi 3 with Raspbian Stretch Lite, Nginx and PHP

A Web IDE server allows you to code wherever you are and whenever you want from any device through a web browser. A Raspberry Pi 3 board is a good gift for programmers and if you happen to receive one or bought one and do not know what to do with it, you may want to setup Codiad Web IDE on it to help you code while you are on the move.

Read on to find out how to setup Codiad Web IDE on your Raspberry Pi 3 with Raspbian Stretch Lite, Nginx and PHP as the LEMP stack.