Skip to content

Instantly share code, notes, and snippets.

View victorighalo's full-sized avatar
🤔
Digging Deeper into the science of computers daily.

Victor Osas Ighalo victorighalo

🤔
Digging Deeper into the science of computers daily.
  • Lagos, Nigeria
View GitHub Profile
{
"name": "hello-world",
"version": "0.1.0",
"private": true,
"dependencies": {
"antd": "^2.12.3",
"bulma": "^0.5.3",
"bulma-components": "0.0.5",
"firebase": "^4.3.0",
"re-bulma": "^0.4.5",
@victorighalo
victorighalo / ContactController.cs
Created March 9, 2018 15:03
Umbraco ContactController
using System;
using System.Web.Mvc;
using Umbraco.Web.Mvc;
using Wyzweb.Models;
namespace Wyzweb.Controllers
{
public class ContactController : SurfaceController
{
// GET: Contact
@victorighalo
victorighalo / Contact.cs
Created March 9, 2018 15:06
Umbraco Contact Model
using System.ComponentModel.DataAnnotations;
namespace Wyzweb.Models
{
public class Contact
{
[Display(Name = "Full Name")]
[Required]
public string Fullname { get; set; }
[Display(Name = "Subject")]
@victorighalo
victorighalo / _ContactForm.cshtml
Created March 9, 2018 15:08
Umbraco Contact Form Partial
@inherits Umbraco.Web.Mvc.UmbracoViewPage<Wyzweb.Models.Contact>
@using Umbraco.Web
@using Recaptcha.Web.Mvc;
@if (TempData.ContainsKey("Response"))
{
<div class="alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@victorighalo
victorighalo / Contact.cshtml
Last active March 9, 2018 21:01
Umbraco Contact Form Template
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using ContentModels = Umbraco.Web.PublishedContentModels;
@{
Layout = null;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@victorighalo
victorighalo / RegisterEvents.cs
Last active June 14, 2018 22:40
Register Events in Umbraco
using Umbraco.Core;
using System.Web.Routing;
using WyzWeb.Public.App_Code.RouteConfig;
namespace WyzWeb.Public.App_Code.BusinessLogic
{
public class RegisterEvents : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
using System.Web.Mvc;
namespace WyzWeb.Public.App_Code.WyzWebControllers
{
public class BaseController : Controller
{
public ActionResult Name()
{
return Content("Victor - Misterwyz");
}
@victorighalo
victorighalo / Routing.cs
Last active June 14, 2018 23:06
Custom ASP.NET MVC Route
using System.Web.Routing;
using System.Web.Mvc;
namespace WyzWeb.Public.App_Code.RouteConfig
{
public class Routing : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapMvcAttributeRoutes();
@victorighalo
victorighalo / RouteServiceProvider.php
Last active July 24, 2018 09:44
Laravel Route Service Provider
<!-- Register the cusom route here -->
public function map()
{
$this->mapCustomRoutes();
}
<!-- Replace custom with whatever name you choose -->
protected function mapCustomRoutes()
{
DB_HOST=mongodb://***/devsconnect
DB_HOST_TEST=mongodb://***/devsconnect_test
NODE_ENV=DEVELOPMENT
JWT_TOKEN=your_scret