Skip to content

Instantly share code, notes, and snippets.

View mojoblanco's full-sized avatar
💭
🔢

John Olawale mojoblanco

💭
🔢
View GitHub Profile
@mojoblanco
mojoblanco / efcli.md
Last active July 13, 2018 07:15
Entity Framework CLI Commands

Scaffold

Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables Blog,Post

Generate Script

Script-Migration -From [FromMigration] -To [ToMigration] -Context ApplicationDbContext

@mykeels
mykeels / NotificationHandler.md
Last active January 28, 2021 19:22
A notification system for ASP.NET MVC applications

AlertHandler

I'll go straight to the point ... sometimes, you have to notify a user of something on the following web page. What I used to do:

TempData["Notification"] = "You have succesfully logged in"; //c# code
@if (TempData["Notification"]) {
@mojoblanco
mojoblanco / link_disable.js
Created December 3, 2016 23:03
Disable specific link
@jacurtis
jacurtis / App\Exceptions\Handler.php
Created July 28, 2016 02:31
How to get filp/whoops to work in Laravel 5.2 or 5.3 - Add this code to your `App\Exceptions\Handler.php` file.
/**
* Create a Symfony response for the given exception.
*
* @param \Exception $e
* @return mixed
*/
protected function convertExceptionToResponse(Exception $e)
{
if (config('app.debug')) {
$whoops = new \Whoops\Run;
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 25, 2024 09:23
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites