Skip to content

Instantly share code, notes, and snippets.

View harryWonder's full-sized avatar
🇳🇬
I am that software developer that you cannot sideline. I am <harrywonder/>

Ilori stephen harryWonder

🇳🇬
I am that software developer that you cannot sideline. I am <harrywonder/>
View GitHub Profile
@harryWonder
harryWonder / dashboard.php
Created May 11, 2020 07:36
The dashboard view for users
<?php require_once('./controller/Dashboard.php'); ?>
<?php
$Dashboard = new Dashboard();
$Response = [];
$active = $Dashboard->active;
$News = $Dashboard->getNews();
?>
<?php require('./nav.php'); ?>
<main role="main" class="container">
<div class="container">
@harryWonder
harryWonder / index.php
Created May 11, 2020 07:38
This file serves as the login page for our application.
<?php require_once('./controller/Login.php'); ?>
<?php
$Login = new Login();
$Response = [];
$active = $Login->active;
if (isset($_POST) && count($_POST) > 0) $Response = $Login->login($_POST);
?>
<?php require('./nav.php'); ?>
<main role="main" class="container">
<div class="container">
@harryWonder
harryWonder / logout.php
Created May 11, 2020 07:39
This view file loads in the logout controller and logs out the current user session.
<?php require_once('./controller/Logout.php'); ?>
<?php new Logout(); ?>
@harryWonder
harryWonder / nav.php
Last active May 15, 2020 00:09
This file acts as the base nav for all other views
<?php require_once('./config.php'); ?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="application-name" content="LD Talent Login Project">
<meta name="author" content="Ilori Stephen A">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>LD Talent | <?php echo ucfirst($active); ?></title>
<!-- Css Styles... -->
@harryWonder
harryWonder / register.php
Last active May 15, 2020 00:08
This file acts as our view for registering or creating a new user.
<?php require_once('./controller/Register.php'); ?>
<?php
$Register = new Register();
$Response = [];
$active = $Register->active;
if (isset($_POST) && count($_POST) > 0) $Response = $Register->register($_POST);
?>
<?php require('./nav.php'); ?>
<main role="main" class="container">
<div class="container">
@harryWonder
harryWonder / config.php
Created May 15, 2020 07:17
This file creates some sane defaults or constants for the application.
<?php
define("BASE_URL", 'http://localhost/' . basename(__DIR__) . '/');
?>
@harryWonder
harryWonder / ContinentController.js
Created May 17, 2020 21:42
This gist acts as my continent controller
const _ = require('lodash');
/****************************************************************/
/************ Custom Module Imports *********************/
/****************************************************************/
const Controller = require('./Controller');
const ContinentModel = require('../model/ContinentModel');
class ContinentController extends Controller {
constructor() {
@harryWonder
harryWonder / package.json
Created May 26, 2020 12:02
This is the package.json file for the cli app in node.js
{
"name": "node-cli-app",
"version": "1.0.0",
"description": "A cli app in node js for getting details about the weather.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@harryWonder
harryWonder / index.js
Created May 26, 2020 12:34
This file serves as the entry point into our application by executing different commands from the terminal.
//Node Modules....
const Yargs = require('yargs');
//Custom Modules....
const Notes = require('./app/Notes');
const Weather = require('./app/Weather');
//App Initialization...
const YargsArgV = Yargs
.command('add', 'Adds A New Note', {
@harryWonder
harryWonder / Notes.js
Last active June 4, 2020 08:56
This file uses a mongodb connection to handle some crud operations for the node-cli-app
const { MongoClient } = require('mongodb');
const _ = require('lodash');
class Notes {
constructor() { }
// Create A New Mongo Connection...
async createConnection() {
// Mongo Config || Constants.....
const Url = 'mongodb://localhost:27017';