This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// For more details see: http://laraget.com/blog/implementing-infinite-scroll-pagination-using-laravel-and-jscroll | |
namespace App\Http\Controllers\InfiniteScrolling; | |
use App\Comment; | |
use Illuminate\Http\Request; | |
use App\Http\Requests; | |
use App\Http\Controllers\Controller; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Função CacularIdade | |
* Função para calcular a idade de uma pessoa, tendo como base o dia de hoje | |
* @params data - String referente à data de nascimento da pessoa, no formato dd/mm/yyyy | |
* @return Retorna uma string com a idade da pessoa em anos. | |
*/ | |
function calcularIdade(data) { | |
var now = new Date(); | |
var today = new Date(now.getYear(),now.getMonth(),now.getDate()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on digital ocean for 18.04 | |
$ sudo apt update | |
$ sudo apt install postgresql postgresql-contrib | |
# make a new non-postgres user for the system without switching roles | |
$ sudo -u postgres createuser --interactive | |
$ sudo -u postgres createdb <your-user-name> | |
# setup a db password for user |