Skip to content

Instantly share code, notes, and snippets.

View LarrySul's full-sized avatar
🎯
Focusing

Sule-Balogun Olanrewaju LarrySul

🎯
Focusing
View GitHub Profile
@LarrySul
LarrySul / ionic
Created June 27, 2017 10:53
kinly help npm install on ionic v 3.4.0
npm ERR! git clone
C:\Users\Larry\AppData\Roaming\npm-cache\_git-remotes\git-github-com-resin-io-bonjour-git-d75da30c
C:\Users\Larry\AppData\Local\Temp\npm-6240-db2c6cf4\git-cache-b54bb684\31d080cee1d8a4b74e03818aaee14da8062f0ea1: Cloning into
'C:\Users\Larry\AppData\Local\Temp\npm-6240-db2c6cf4\git-cache-b54bb684\31d080cee1d8a4b74e03818aaee14da8062f0ea1'...
npm ERR! git clone
C:\Users\Larry\AppData\Roaming\npm-cache\_git-remotes\git-github-com-resin-io-bonjour-git-d75da30c
C:\Users\Larry\AppData\Local\Temp\npm-6240-db2c6cf4\git-cache-b54bb684\31d080cee1d8a4b74e03818aaee14da8062f0ea1: error: cannot spawn sh: No such file or directory
npm ERR! git clone
C:\Users\Larry\AppData\Roaming\npm-cache\_git-remotes\git-github-com-resin-io-bonjour-git-d75da30c
C:\Users\Larry\AppData\Local\Temp\npm-6240-db2c6cf4\git-cache-b54bb684\31d080cee1d8a4b74e03818aaee14da8062f0ea1: fatal: unable to fork
@LarrySul
LarrySul / contact markup
Last active April 11, 2019 13:24
Setting up and validating contact form
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sending Feedback PHPMailer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
@LarrySul
LarrySul / Final code to send mail by @DevLarry
Last active April 3, 2021 15:24
Configure and set up PHPMailer to send mails
<?php
// use the phpmailer we installed via composer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
require 'vendor/phpmailer/phpmailer/src/Exception.php';
require 'vendor/phpmailer/phpmailer/src/PHPMailer.php';
require 'vendor/phpmailer/phpmailer/src/SMTP.php';
if (array_key_exists('to', $_POST)) {
command usage
git init Creates an empty Git repository in the specified directory.
git clone <repository name> Clones a repository located at <repository name> onto your local machine.
git add <directory> Stages only the specified changes for the next commit. Replace <directory> with a <file> to change a specific file.
git add . Stages new files and modifications without deletions
git add -A Stages all changes
git add -all Equivalent to git add -A
git add -u Stages modifications and deletions without adding new files
git add --update Equivalent to git add -u
git commit -m ”<message>” Commits the staged snapshot. replace <message> with the commit message.
let str = "I gave him the apple";
let regex = /apple/;
let str = "He collected the apple";
let regex = /apple/;
let result = regex.test(str);
console.log(result);
var person = {
firstName: "Ogunremi",
lastName: "Marian",
age: 25,
maritalStatus: "Married"
};
@LarrySul
LarrySul / javascript object the easy way @devlarry
Last active May 10, 2019 19:39
creating objects with the new keyword
var person = new Object();
person.firstName = "Amatare";
person.lastName = "Kripsy";
person.age = 25;
person.maritalStatus = "Dating";
@LarrySul
LarrySul / javascript object the easy way @devlarry
Last active May 10, 2019 19:54
javascript object methods
var person = {
firstName: "John",
lastName : "Doe",
id : 5566,
fullName : function() {
return this.firstName + " " + this.lastName;
},
exam : function () {
return 'I have exam on Monday';
<form>
.
form elements
.
</form>