Skip to content

Instantly share code, notes, and snippets.

@antonioribeiro
antonioribeiro / @accordion
Last active August 29, 2015 13:58
Steroids Accordion Example
<div class="panel-group smart-accordion-default" id="accordion-2">
@_BODY
</div>
@antonioribeiro
antonioribeiro / gist:db07ab8c6189ff69de86
Last active August 29, 2015 14:01
Vagrant Troubleshooting (Laravel Homestead)

If you do

vagrant up

and receive

There was an error while executing `VBoxManage`, a CLI used by Vagrant

How to create Swap on Linux / Ubuntu

Enable swap

sudo swapon -s

Create a 2GB file

sudo dd if=/dev/zero of=/swapfile bs=1024 count=2048k

<?php
$user = User::find(15); /// will find the user in Domino or Locally
class User Extends Eloquent {
protected $table = 'users';
public static function find($id)
{
<?php
namespace A {
class ClassA {
public function doA()
{
try
{
Routes By Name

Having a route of

Route::get('user/{id}', ['as' => 'user.profile', 'use' => 'UsersController@profile']);

###Laravel Forge & StarCom Free SSL certificates

Firefox, and probably other browsers, complaint about StartSSL certificates if you don't provide your site's SSL certificate togheter with the StarCom's ones. To fix this, you just have to download those certificates:

http://www.startssl.com/certs/ca.pem
http://www.startssl.com/certs/sub.class1.server.ca.pem

And paste them in the "Certificate" textarea, alongside with your current site certificate. Having all three certificates in the same textarea, save, activate it and you should be good to go.

@antonioribeiro
antonioribeiro / gist:e12fdf54bab87243128a
Created July 23, 2014 19:12
boot laravel on codeception _bootstrap
<?php
include __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/start.php';
$app->boot();
\Codeception\Util\Autoload::registerSuffix('Page', __DIR__.DIRECTORY_SEPARATOR.'_pages');
\Codeception\Util\Autoload::registerSuffix('Steps', __DIR__.DIRECTORY_SEPARATOR.'_steps');