Skip to content

Instantly share code, notes, and snippets.

View shegunbabs's full-sized avatar

Shegun Babs shegunbabs

  • ON, CA
  • 23:04 (UTC -04:00)
View GitHub Profile
@shegunbabs
shegunbabs / install_lamp_ubuntu.sh
Created October 19, 2023 13:54 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 22 - PHP development (php 7.4 / 8.2, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20/22 dev Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
<?php
namespace App\Providers;
use App\Services\Monnify\MonnifyApiService;
use Illuminate\Support\ServiceProvider;
class CashmoreServiceProvider extends ServiceProvider
{
/**
@shegunbabs
shegunbabs / meta-tags.md
Created April 3, 2021 15:49 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
#-----------------------------------------------------------------------------------|
# push to git with a commit message [--prod (minify scripts & css)]
# envoy run push --message='git message here' --prod
# Do a git pull in application dir on server
# envoy run pull-on-server
# --composer -> run composer install
# envoy run deploy --message="git message here" --composer --prod
#-----------------------------------------------------------------------------------|
@servers(['local' => 'vagrant@localhost -p2223', 'web' => 'user@serverIP -p22'])
<?php
namespace Tests\Feature;
use App\User;
use Tests\TestCase;
use Livewire\Livewire;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Testing\RefreshDatabase;
@shegunbabs
shegunbabs / pmt.js
Created May 13, 2019 13:32 — forked from maarten00/pmt.js
Excel PMT in PHP and JavaScript
/**
* Copy of Excel's PMT function.
* Credit: http://stackoverflow.com/questions/2094967/excel-pmt-function-in-js
*
* @param rate_per_period The interest rate for the loan.
* @param number_of_payments The total number of payments for the loan in months.
* @param present_value The present value, or the total amount that a series of future payments is worth now;
* Also known as the principal.
* @param future_value The future value, or a cash balance you want to attain after the last payment is made.
* If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.
@shegunbabs
shegunbabs / ExcelFormulas.js
Created November 1, 2018 17:19 — forked from pies/ExcelFormulas.js
Few Excel formulas - PMT, PPMT, XIRR - expressed in Javascript
/* Based on
* - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co>
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1)
*/
var ExcelFormulas = {
PVIF: function(rate, nper) {
return Math.pow(1 + rate, nper);
},
@shegunbabs
shegunbabs / smsMail
Last active August 29, 2015 14:06 — forked from anonymous/smsMail
function smsMail()
{
try
{
var label = GmailApp.getUserLabelByName('smsMail');
var threads = label.getThreads();
var now = new Date().getTime();
var cal=getCalendar();
for(i in threads)