Skip to content

Instantly share code, notes, and snippets.

View hurlatunde's full-sized avatar

Olatunde Owokoniran hurlatunde

View GitHub Profile
try {
$url = 'https://api.paystack.co/bank/resolve?account_number='.$bankAccountNumber.'&bank_code='.$bankCode;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 400);
//Firebase Auth instance
const auth = firebase.auth();
const email = fornData.email_address;
const password = fornData.password;
const promise = auth.signInWithEmailAndPassword(email, password);
promise.then(function (user) {
// get the current loggeg in users details
console.log(user);
})
//Firebase Auth instance
const auth = firebase.auth();
//Firebase Database instance
const database = firebase.database();
//get all input element as an array
var formData = formToArray('signUp');
const email = formData.email_address;
const password = formData.password;
//Firebase Auth instance
const auth = firebase.auth();
const email = fornData.email_address;
const password = fornData.password;
const promise = auth.createUserWithEmailAndPassword(email, password);
promise.then(function (user) {
// get the current loggeg in users details
console.log(user);
})
@hurlatunde
hurlatunde / index.ctp
Created August 14, 2018 14:26 — forked from egi/index.ctp
CakePHP sample with custom query and pagination.
<?php pr($list); ?>
@hurlatunde
hurlatunde / index.ctp
Created August 14, 2018 14:26 — forked from egi/index.ctp
CakePHP sample with custom query and pagination.
<?php pr($list); ?>
@hurlatunde
hurlatunde / relationship_database.json
Last active August 10, 2018 10:39
Relationship in a Firebase database type
{
"Events": {
"event_one": {
"event_name": "Global event",
"event_location": "Lagos Ikeja",
"event_created": 16082017,
"event_active": "active",
"Speakers": {
"0": "speaker_one",
"1": "speaker_two",
@hurlatunde
hurlatunde / ApiController.php
Last active May 15, 2018 07:52
beforeFilter
<?php
class ApiController extends AppController {
const ERR_ERROR = 200;
const ERR_BUNDLE_ERROR = 201;
const ERR_FORM_VALIDATION_ERROR = 301;
const ERR_DUPLICATE = 100;
const ERR_EMPTY_DATA = 400;