Skip to main content

Posts

Showing posts from April, 2019

Git

https://github.com/joshnh/Git-Commands Getting & Creating Projects Command     Description git init     Initialize a local Git repository git clone ssh://git@github.com/[username]/[repository-name].git     Create a local copy of a remote repository Basic Snapshotting Command     Description git status     Check status git add [file-name.txt]     Add a file to the staging area git add -A     Add all new and changed files to the staging area git commit -m "[commit message]"     Commit changes git rm -r [file-name.txt]     Remove a file (or folder) Branching & Merging Command     Description git branch     List branches (the asterisk denotes the current branch) git branch -a     List all branches (local and remote) git branch [branch name]     Create a new branch git branch -d [branch na...

React Native Reducer Action Notes

  1. Create action types : types.js export const LIST_FACET         = 'view_facet_list'; export const LIST_FACET_FAILED  = 'facet_list_failed'; export const LIST_FACET_SUCCESS = 'facet_list_success';    2. Create junction file : index.js export * from './CategoryActions'; export * from './FacetAction'; 3. Create action file : action.js import {listproductsAPI} from '../Api/methods/productActionsAPI'; import {   LIST_PRODUCTS,   PRODUCT_LIST_FAILED,   PRODUCT_LIST_SUCCESS } from './types'; export const productsFetch = () => {   return (dispatch) => {     dispatch({ type: LIST_PRODUCTS });     listproductsAPI()     .then(productsData => productListResponse(dispatch, productsData.result.docs))     .catch(error => productlistFail(dispatch, "Products Not Found. Something went wrong. Please try again."));     }; }; const productList...

Send Email

MAIL FUNCTION Most of the web projects have the email sending functionality. Before uploading to the live server email functionality need to be checked on the local server. But PHP mail() function will not work at the localhost. ... To using Gmail SMTP server, you should need to change account access for less secure apps    <?php     require 'phpmailer/autoload.php';     use PHPMailer\PHPMailer\PHPMailer;     use PHPMailer\PHPMailer\Exception;     //$mail = new PHPMailer;     //$mail->SMTPDebug = 3;                               // Enable verbose debug output     $mail = new PHPMailer(true);        $mail->SMTPDebug = 0;          ...