- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
dialog { | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
right: auto; | |
padding: 30px; | |
transform: perspective(500px) translate(-50%, -50%); | |
background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
border: none; | |
border-radius: 3px; |
// first run npm install ngrok - then put var ngrok = require('ngrok'); at the top of your gulpfile | |
var ngrok = require('ngrok'); | |
var browserSync = require('browser-sync') | |
browserSync({ | |
server: "./app" | |
}, function (err, bs) { | |
ngrok.connect(bs.options.get('port'), function (err, url) { | |
// https://757c1652.ngrok.com -> 127.0.0.1:8080 | |
}); | |
}); |
<?php namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Request; | |
use View; | |
use App; | |
abstract class ApplicationsServiceProvider extends ServiceProvider | |
{ | |
public function register() |
/** | |
* Console.log with call location and grouping to reduce log noise. | |
* Apply directly to code once. | |
* | |
* Original: http://remysharp.com/2014/05/23/where-is-that-console-log/ | |
*/ | |
var groupable = typeof console.groupCollapsed !== 'undefined'; | |
['log', 'warn'].forEach(function(method) { | |
var old = console[method]; | |
console[method] = function() { |
A list of Sketch plugins hosted at GitHub, in no particular order.
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
/* MIXINs */ | |
@mixin transition( $val : ease 0.5s ) { | |
-webkit-transition: $val; | |
-moz-transition:$val; | |
-o-transition:$val; | |
-ms-transition:$val; | |
transition:$val; | |
} | |
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) { |