Python

Quickest and Easiest Way

Using the in operator in python:

if "blah" in somestring: 
# Do something

Explanation

Use the in comparison operator because

  1. The language intends its usage, and
  2. Other Python programmers…


Git

Quick Guide

git push -d <remote_name> <branch_name>
git branch -d <branch_name>

Delete Local Branch

To delete the local branch use one of the following syntax :

git branch -d branch_name
git branch -D branch_name

Git

Steps to undo the most recent local commits

$ git reset HEAD~                              # (1)
[ edit files as necessary ] # (2)
$ git add . # (3)
$ git commit -c ORIG_HEAD # (4)
  1. This command is responsible for the undo. It will undo your last commit while…


WordPress and App Engine

Prerequisites

  1. Create a project in the Cloud Console.
    You need to have one project in Google Cloud to work with any of the google cloud services, In this project, we will make use of Cloud SQL API and Google App Engine which required us to have such a project before using them.
  2. Enable billing for your project.
    It is always a best practice to enable billing in a…


Python

Introduction

If you work on multiple Python projects, you’ve probably run into this one time or another. You have the latest and greatest version of Python installed, and the project you’re about to work on requires an older version. In those situations, the Python Version Manager(pyenv) is a great tool to use, allowing you to install multiple versions of Python and switch between them as you see fit.

Prerequisites

Before you install pyenv itself, you’re going to need some OS-specific dependencies. These dependencies…


Introduction

If you work on multiple Node.js projects, you’ve probably run into this one time or another. You have the latest and greatest version of Node.js installed, and the project you’re about to work on requires an older version. In those situations, the Node Version Manager (nvm) is a great tool to use, allowing you to install multiple versions of Node.js and switch between them as you see fit.

Prerequisites

To complete this tutorial, you will need the following:

  • The latest version of…



API Security

Vulnerabilities are the gaps or weaknesses in a system that make threats possible and tempt threat actors to exploit them.

As we discussed earlier, the exponential growth of API usage in today’s digital world brings the risk of those APIs being vulnerable to attacks. …


API Security


React Context API

Introduction

The issue:

If you are an expert on React of if you have some level of experience with React or React Native development, you might have come across with different difficult situations like where you need to pass the data deep down in the child component hierarchy, that becomes cumbersome when you have a very deep child component hierarchy. …

Chamika Kasun

Versatile Full-stack Developer with 5+ years of experience designing, developing, and managing complex applications and internal frameworks.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store