What is Docker? Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package — OpenSource.com, What is Docker?
Docker enables us to separate our applications from our infrastructure. So we developers can focus on writing code without worrying about the system it will ultimately run on.
Intro The authentication that comes with Django is good enough for most common cases. Django also allows us to customize authentication if the defaults don’t match our requirements.
There are multiple approaches we can take to customize the Django authentication system. We can extend the default User model, or substitute a completely customized model.
Extending the default User model There are two ways to extend the default User model without substituting our own model.
PostgreSQL is a object-relational database management system. It is most advanced open soruce relational database.
Taking backups using pg_dump : pg_dump is a utility for backing up a PostgreSQL database.
We can extract the database in script file or archive file formats :
Script Files : These are plain-text files containing the SQL commands. We can restore data from these script files using psql. Archive Files : The archive files allow pg_restore to rebuild the database.
Intro MongoDB is a document-oriented NoSQL database. It is one of the most powerful NoSQL systems and databases around, today.
Key Features : Here is the key features of MongoDB :
MongoDB is free to use. MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time The document model maps to the objects in your application code, making data easy to work with Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data MongoDB is a distributed database at its core, so high availability, horizontal scaling, and geographic distribution are built in and easy to use source: MongoDB Website
MongoDB comes with two commands that allow us to quickly backupand restore to our running MongoDB instances. In order to take backups, we can use the mongodump command which creates BSON dump files. And to restore those dump, we can use the mongorestore command.
Taking Backups - all databases $ mongodump - single database $ mongodump --db <DATABASE> - single collection $ mongodump --db <DATABASE> --collection <COLLECTION> - from remote host $ mongodump --host <HOST>:<PORT> --username <USERNAME> --password <USERNAME> --db <DATABASE> - using uri $ mongodump --uri="<CONNECTION STRING>" *if your local mongodump is having lower version than remote mongodb and the above command does not work, try adding the --forceTableScan option.
Intro AWS Identity and Access Management (IAM) is a web service that helps us securely control access to AWS resources. We can control authentication (who can signed in) and authorization (who has permissions to use resources) using IAM. When we create an AWS account, we get a root user which has complete access to all AWS services and resources in the account. It is recommended that we do not use the root account regularly, instead we should create IAM users to access the AWS services and resources frequently.
Intro This is a very simple guide for first-timers to making open source contributions. I guess that you already have a GitHub account and know basic git commands.
Steps for Contributing Fork First, we need to choose a project we want to contribute. Then we will fork the project to our github account.
Clone Now, we need to clone the project to our machine from our fork.
$ git clone <url> Syncing the fork We should keep our fork up-to-date with the main(aka upstream) repository.
By default, phpMyAdmin allows us to connect to local MySQL server only. But we may need to access multiple database servers from our single phpMyAdmin. It’s such an easy job. For each new server, we will just need to create a new config file (with .php extension) in /etc/phpmyadmin/conf.d directory.
lets create a new server
sudo nano /etc/phpmyadmin/conf.d/second-server.php <?php $cfg['Servers'][2]['verbose'] = 'Database Server #2'; $cfg['Servers'][2]['host'] = 'DB_HOST'; $cfg['Servers'][2]['user'] = 'DB_USERNAME'; $cfg['Servers'][2]['password'] = 'DB_PASSWORD'; That’s it!
Intro Database normalization is the process of organizing a relational database to reduce data redundancy (duplicate data) and improve data integrity. The concept of Normalization was introduced by Edgar F. Codd.
Normalization is part of a successful database design. It makes a Relation or Table free from insert/update/delete anomalies and saves space by removing duplicate data.
Normal Forms Theory of Data Normalization is still being developed further. There are discussions even on 6th Normal Form.
What is Firebase? Firebase is a very popular platform for developing mobile and web application. Firebase provides many services of different categories such as : analytics, authentication, app performance reports, cloud hosting etc. To view the list of all products with details, please check this page.
Firebase Cloud Messaging (FCM) Firebase Cloud Messaging(FCM) (Formerly known as Google Cloud Messaging or GCM) is a cross-platform messaging solution that lets us reliably deliver and receive messages and notifications on Android, iOS and the Web at no cost.
Intro Use Case Diagrams are used to visualize different types of users in a system and how those users interact with the system. It provides a higher-level view of the system.
A single use case diagram captures a particular functionality of a system. So to model the entire system, a few major use cases are used. A Use case diagram should not go deep into the details of use cases rather it should be easily understood by any non-technical person.
What is Swagger? Swagger is a very popular framework for describing RESTful APIs using a common language that everyone can understand. It is actually a set of open-source tools for designing, building, documenting and consuming REST APIs.
Swagger Specification? The Swagger Specification (currently known as the OpenAPI specification) is a powerful definition format to describe RESTful APIs. The specification creates a RESTful interface for easily developing and consuming an API by effectively mapping all the resources and operations associated with it.
We can think of Server Blocks as specifications for individual web sites. Server blocks are the NGINX equivalent of Apache’s virtual hosts. So in order to host our websites on Nginx server, we need to understand the directives and settings that make up the server block.
Here is a sample server block configuration :
server { listen 80; server_name _; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 404 /404.
What is AWS? Amazon Web Services (AWS) is a secure cloud services platform. It provides a broad set of infrastructure services, such as computing power, storage options, networking and databases. Millions of customers use AWS cloud products and solutions to build sophisticated applications.
source : https://aws.amazon.com/what-is-aws/
Getting Started Create a New Account Go to https://portal.aws.amazon.com/billing/signup#
Get Hands On These 10-Minute Tutorials are simple “Hello, World!” technical documents to help you get hands-on with AWS.
What is Nginx Nginx is a high performance web server which is lightweight, free and open-source. It can be used as a standalone web server (like Apache) or as a reverse proxy (serve in front of the web servers). Nginx is also used as mail proxy server, load balancer and HTTP cache.
Why use Nginx? There are other web servers such as Apache, IIS etc. So what makes Nginx special?
Intro WebSocket is a protocol (like HTTP) which defines how two parties can communicate. It is a technique for two-way communication over one (TCP) socket.
A very good intro is written in this post
How It Works WebSockets provide a persistent connection between a client and server.
Once a WebSocket connection is established the connection stays open until the client or server decides to close this connection. With this open connection, the client or server can send messages to each other at any given time.
What is Data Structure? Data structures are ways to store data in an organized fashion so that it can be used efficiently. Just like there are many ways (i.e alphabetically or by genre) you can organize your books in a bookshelf.
Types Linear : Array, Linked List, Stack, Queue etc Non Linear : Tree, Graph etc Operations We can do different types of operations on different data structures.
What is LEMP stack? LEMP stands for Linux, nginx (pronounced engine-x), MySQL, and PHP. It is actually a variation of the LAMP stack where Apache is replaced with nginx.
Setup So, We are going to setup LEMP stack on our ubuntu 14.04 machine.
Step 1 : Update Apt-Get Update the package database. To know more about apt-get, please visit this page.
sudo apt-get update Step 2 : Install nginx Installing nginx is very easy as Ubuntu provides nginx package in its default repositories.
What is Linux? Just like Windows and Mac OS X, Linux is an operating system. It is an open source Unix-like operating system.
Although Linux is generally used to refer to the entire OS, Linux is basically the name of the Kernel which was developed by Linus Torvalds. I think this answer explains it all.
Linux Commands We should have some basic ideas of Shell, Bash and Terminal first if we want to work with Linux Command Line.
What is Node.js? : Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world – Official Website
npm? npm is the Node.js package manager. It allows us to easily install modules and packages to use with Node.js.
nvm? nvm is Node Version Manager.
What is Composer? Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. - getcomposer.org
Why Use Composer? Suppose, we want to use a mail library for our PHP project, let’s say PHPMailer. We would normally download the PHPMailer library and put it on our project’s folder. But, PHPMailer depends on some other libraries too.
Redis is an in-memory data structure server. Which can be used as database, cache and message broker.
Redis = REmote DIctionary Server.
a key-value store is commonly known today as a dictionary. https://en.wikipedia.org/wiki/Key-value_database
# Data Structure Server Data Structure is a particular way of organizing data. Redis is a data structure server. An important difference between Redis and other structured storage systems is that Redis supports not only strings, but also abstract data types.
What is Database? : A database is a collection of data that is stored in an organized manner.
the term “database” is often used casually to refer to both a database and the DBMS used to manipulate it.
Database Models : A database model refers to the logical structure, representation or layout of a database and how the data will be stored, managed and processed within it.
What is GIT? Git is a free and open source distributed version control system.
Why we use VCS (version control system)?
Code Revision Like a Time Machine Multiple Developer Why GIT (among other VCS)?
Can work locally without any central server Setup Now let’s install Git on our machine and start using it.
Installation Please follow the offical doc to install git.
Configuration Use git config command to get and set configuration variables
What is a HTTP Cookie? Cookies are small files that is sent from a website(server) and stored on users’s computer by a browser.
It is also called web cookie, Internet cookie, browser cookie or simply cookie.
Usage Cookies are mainly used for these purposes
Session management (user logins, shopping carts) Personalization (user preferences) Tracking (analyzing user behavior) source : MDN
How server/client sends cookie? Server to Browser The server tells the client (Browser) to store a cookie using the Set-Cookie HTTP header.
What is Exception Exception is an error condition which change the normal flow of code execution. Exceptions are catchable. That means, we can catch and try to recover or continue with the execution of the program.
‘errors’ vs ‘exceptions’ : Generally errors occur at the language level (ie, the syntax is wrong, missing parenthesis etc)
Exceptions in PHP Exceptions were introduced in PHP 5. It is used in an object oriented way.
What is Stripe? A popular payment processor. It accepts payments from customers around the world on web or in mobile apps.
Payment types Stripe accepts all major debit and credit cards in 100+ currencies. It also supports bank and direct debit payments, local payment wallets, Alipay and cryptocurrency (Bitcoin) etc.
Accepting Payments with Cards Using card information with Stripe is a two-step process
Securely collect payment information using tokenization Use the payment information in a charge request or save it for later Step 1 : Securely collect payment information using tokenization Stripe provides three methods for tokenizing customer’s payment information over HTTPS Checkout, Stripe.
TCP/IP TCP = Transmission Control Protocol
IP = Internet Protocol
TCP/IP হলো একটা Protocol Suite.
TCP/IP = TCP + IP + more protocols ..
WWW ( World Wide Web ) এ Browser গুলা Server এর সাথে connect করার জন্য TCP use করে। HTTP, HTTPS, SMTP, FTP ইত্যাদি protocol গুলা তাদের কাজের জন্য TCP কে use করে।
HTTP (HyperText Transfer Protocol) HTTP হলো একটা request-response stateless protocol যার মাধ্যমে Client এবং Server পরস্পর Communicate করতে পারে।
What is JSON? JSON stands for JavaScript Object Notation.
Douglas Crockford originally specified the JSON format in the early 2000s. Altohugh it derives from JavaScript, but as of 2017 many programming languages include code to generate and parse JSON-format data.
JSON filenames use the extension .json.
The official internet media type for JSON is ‘application/json’
Why use JSON?: Because It is
lightweight data-interchange format. language independent “self-describing” and easy to understand by both humans (to understand) and machines (to parse and generate).
Install Hugo To install Hugo in your operating system, please visit the official guide. As I am using ubuntu, installing Hugo is as simple as sudo apt install hugo
Getting Started Hugo allows us to scaffold a website quickly and easily.
create new site $ hugo new site blog Choose a theme Download a theme from https://themes.gohugo.io/ and put in ‘theme’ folder
for example, in order to install the casper theme,