Skip to content

Instantly share code, notes, and snippets.

@antonioribeiro
antonioribeiro / gist:8429426
Last active January 30, 2016 08:00
Laravel Environmental

Create a .environment file in the root of your application and define your environment and gitignore it:

return array(

      'LARAVEL_ENV' => 'development',

      'POSTGRESQL.HOST' => 'localhost',
      'POSTGRESQL.DATABASE_NAME' => 'laraveldatabase',
      'POSTGRESQL.DATABASE_USER' => 'laraveluser',
@antonioribeiro
antonioribeiro / gist:8640033
Created January 26, 2014 22:03
Installing Glances on Ubuntu 12.04
sudo apt-get install --yes python python-psutil python-setuptools python-dev
<!DOCTYPE html>
<html lang="en" ng-app="application">
<body class="theme-pattern-lightmesh" ng-controller="ApplicationController">
<head>
<script src="http://code.angularjs.org/1.2.10/angular.min.js"></script>
</head>
<form class="simple-form">
<input type="email" ng-model="user.email" placeholder="E-mail" />
<input type="email" ng-model="user.email_retyped" placeholder="Redigite o e-mail" />
@antonioribeiro
antonioribeiro / gist:8838286
Last active August 29, 2015 13:56
Shared Hosting & PHP
| PHP | 5.4 | 5.5 | Mention date | PHP version information link
+----------------------+-----+-----+--------------+------------------------------------------------------------------------
| justHost.com | X | | 2013-09-06 | https://my.justhost.com/cgi/help/447
| NetworkSolutions | X | | 2013-03-17 | http://forums.networksolutions.com/index.php?showtopic=10601&mode=linearplus
| BlueHost | X | | Today? | https://my.bluehost.com/cgi/help/php-version
| HostGator | X | X | Today | https://support.hostgator.com/articles/hosting-guide/hardware-software/what-version-of-php-are-you-using
| 1&1 | X | X | Today | http://www.1and1.com/details-php-programming
| FatCow | X | | ? | http://www.mybestwebhostingsites.com/details/fatcow-wordpress/
| Hub | X | | 2012-04-17 | http://www.webhostinghub.com/help/news/archive-announcements/php-5-4
| G
@antonioribeiro
antonioribeiro / gist:8967895
Last active August 29, 2015 13:56
Deeployer using Laravel Envoy

Install Deeployer and Envoy.

Create a route in your application for your deployer url:

Route::post('deploy', function() 
{
    return Deeployer::run();
});
@extends('layout')
@section('content')
@section('html5-head')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@stop
@ijs(//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js)
@extends('views.site._layouts.page')
<?php
$requiredJavascripts[] = 'javascript.formLoader';
$boxTitle = 'Add '.$model->getName();
$boxIcon = $model->getIcon();
?>
@section('pageContent')
...
@antonioribeiro
antonioribeiro / 01 - form.png
Last active August 29, 2015 13:57
Laravel Blade on Steroids Example
01 - form.png
### Keybase proof
I hereby claim:
* I am antonioribeiro on github.
* I am antonioribeiro (https://keybase.io/antonioribeiro) on keybase.
* I have a public key whose fingerprint is 8E5E 0BAE 09D7 5F91 4E89 111F 5A6C 7BCA BBC9 E0F7
To claim this, I am signing this object:
<?php
class Eloquent {
}
class Sentry extends Eloquent {
protected $guarded = [
'sentry column',