Skip to content

Instantly share code, notes, and snippets.

View appsol's full-sized avatar

Stuart Laverick appsol

View GitHub Profile
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Log;
class LogAfterRequest {
public function handle($request, \Closure $next)
{
return $next($request);
}
@appsol
appsol / Contract Killer 3.md
Created November 24, 2016 17:18
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@appsol
appsol / README.md
Last active August 29, 2015 14:16 — forked from dciccale/README.md

DOM Ready

Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.

#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!-- ############# GLOBAL LAYOUT UPDATES ############# -->
<default>
<!-- Remove unwanted blocks entirely
<remove name="right.poll"/>
<remove name="right.permanent.callout"/>