Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View asraraljuhani's full-sized avatar
🎯
Focusing

Asrar Aljuhani asraraljuhani

🎯
Focusing
View GitHub Profile
def is_permutation(arr1, arr2):
if len(arr1) == 0 or len(arr2) == 0 or len(arr1) != len(arr2):
return False
else:
for i in range(len(arr1)):
if arr1[i] != arr2[len(arr2)-1-i]:
return False
return True
def is_unique1(str):
str_set = set()
for char in str:
str_set.add(char.lower())
if(len(str_set) == len(str)):
return True
else:
return False
@asraraljuhani
asraraljuhani / email_template.html
Created March 26, 2020 14:45
Email Template for ALMousalla project
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #FFFFFF;">
<table cellpadding="0" cellspacing="0" class="nl-container" role="presentation"
style="table-layout: fixed; vertical-align: top; min-width: 320px; Margin: 0 auto; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #FFFFFF; width: 100%;"
valign="top" width="100%">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td style="word-break: break-word; vertical-align: top;" valign="top">
<div style="background-color:transparent;">
<div class="block-grid"
style="Margin: 0 auto; min-width: 320px; max-width: 500px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;">
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const path = require('path');
var multer = require('multer')
const items = require('./routes/api/items');
const assert = require('assert');
const mongodb = require('mongodb');
const formidable = require('formidable')
// DB Config