Skip to content

Instantly share code, notes, and snippets.

Jorge webinfinita

Block or report user

Report or block webinfinita

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View meta-viewport
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" >
webinfinita / setTitleSlug
Last active Aug 29, 2015
Create Slug of given title on save
View setTitleSlug
public function setTitleAttribute($title)
$this->attributes['title'] = $title;
$this->attributes['slug'] = Str::slug($title);
webinfinita / filters.php
Created Oct 29, 2014
Filters for API's
View filters.php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With');
header('Access-Control-Allow-Credentials: true');
webinfinita / remove-modal-content
Last active Aug 29, 2015
Remove ajax modal content on close
View remove-modal-content
$('body').on('', '.modal', function () {
webinfinita / Mailer.php
Last active Aug 29, 2015
Abstract Mailer class for Laravel 5
View Mailer.php
<?php namespace App\Services\Mailers;
abstract class Mailer {
public function sendTo($user, $subject, $view, $data = [])
Mail::queue($view, $data, function($message) use ($user, $subject)
webinfinita / PresentableTrait.php
Last active Aug 29, 2015
View Presenters for Laravel 5
View PresentableTrait.php
<?php namespace App\Presenters;
trait PresentableTrait {
protected $presenterInstance;
public function present()
if (! $this->presenter)
webinfinita / helpers.js
Created Mar 17, 2015
Common helper functions
View helpers.js
$('*[data-confirm]').on('click', function(e) {
var conf = confirm($(this).data('confirm'));
if(! conf) e.preventDefault();
$('body').on('', '.modal', function () {
webinfinita / gist:e94fdad46b675c18c287
Created May 8, 2015
Nginex for Wordpress inside Laravel 5 installation
View gist:e94fdad46b675c18c287
location @wp {
rewrite ^/blog(.*) /blog/index.php?q=$1;
location ^~ /blog {
root /home/vagrant/Code/site;
index index.php index.html index.htm;
try_files $uri $uri/ @wp;
location ~ \.php$ {
webinfinita / session-messages.blade
Last active Sep 16, 2015
Check and display session messages for Laravel 5 with AdminLTE styles
View session-messages.blade
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4><i class="icon fa fa-check"></i> Excelente!</h4>
{{ session()->get('success_message') }}
<div class="alert alert-info alert-dismissable">
View gist:65de8119a1cb7f542448
server {
listen 80;
root /home/forge/;
ssl_protocols TLSv1.2;
index index.html index.htm index.php;
charset utf-8;
You can’t perform that action at this time.