Here's how I set up a tiny Nginx/Rails server that uses HTTPS via a Let's Encrypt issued certificate.
I use the smallest DigitalOcean droplet (512 MB) here, which is built from the "Ubuntu Ruby on Rails on 14.04" image provided by them.
Here's how I set up a tiny Nginx/Rails server that uses HTTPS via a Let's Encrypt issued certificate.
I use the smallest DigitalOcean droplet (512 MB) here, which is built from the "Ubuntu Ruby on Rails on 14.04" image provided by them.
<?php namespace Potentia\Console\Commands; | |
use Activation; | |
use DB; | |
use Illuminate\Console\Command; | |
use Sentinel; | |
class UpgradeToSentinel extends Command | |
{ |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
I was asked how I deal with validation / create and update validation rulesets. Well here is one method I have used. Don't be afraid to build on top of what the framework has already given you. In my projects I use a base class for almost anything. You never know when you want your classes to inherit some common functionality. My BaseValidator
actually has some pretty useful methods and properties in it.
<?php
namespace FooProject\Internal\Validators;
use FooProject\Internal\Sanitizers\BaseSanitizer;
alias gundo='git reset HEAD~ && git clean -df' |
(function(global) { | |
var silpUrl = '//s3-eu-west-1.amazonaws.com/silp.shootitlive.com/js/silp.min.js'; | |
// Globals | |
if(!global.Silp) { global.Silp = {}; }; | |
var Silp = global.Silp; | |
// To keep track of which embeds we have already processed | |
if(!Silp.foundEls) Silp.foundEls = []; |