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
import axios from 'axios' | |
export default class Permission { | |
constructor (idUser) { | |
this.$axios = axios | |
this.permissions = [] | |
this.getPermission(idUser) | |
} | |
async getPermission () { |
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 | |
namespace Plenus\Repositories\Configuracao\Geral; | |
use Plenus\Entities\TbProgramaModalidade; | |
use Plenus\Repositories\Repository; | |
class ModalidadeRepository extends Repository | |
{ | |
public function __construct() |
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
<q-modal v-model="minimizedModal" ref="modalRef" maximized slot="modal" > | |
<q-modal-layout> | |
<form class="col column"> | |
<div class="q-display-1 q-mb-md q-pa-sm">Formulário - {{ title }}</div> | |
<div class="row"> | |
<div class="col-4"> | |
<q-select | |
stack-label="Nível" | |
v-model="form.nivel" | |
filter |
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
rbenv install 2.1.5 | |
Downloading ruby-2.1.5.tar.bz2... | |
-> https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.bz2 | |
Installing ruby-2.1.5... | |
WARNING: ruby-2.1.5 is past its end of life and is now unsupported. | |
It no longer receives bug fixes or critical security updates. | |
BUILD FAILED (Ubuntu 16.04 using ruby-build 20190130) |
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 | |
/*Métodos de PlugHelper*/ | |
public static function getMatch($route, $pattern = '{(.*?)}') | |
{ | |
$pattern = "/{$pattern}/"; | |
preg_match($pattern, $route, $matches); | |
return !empty($matches[1]) ? $matches[1] : null; | |
} |
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
<table border="1" cellspacing="0" cellpadding="1"><tr> | |
<td rowspan="4">2016</td> | |
</tr><tr> | |
<td>1</td> | |
<td>2</td> | |
<td>3</td> | |
<td>4</td> | |
<td>5</td> | |
<td>6</td> | |
<td>7</td> |
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
require_once dirname(__DIR__).'/vendor/autoload.php'; | |
use \PlugRoute\PlugRoute; | |
$route = new PlugRoute(); | |
header("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE"); | |
//header("Access-Control-Allow-Headers: PUT"); | |
header("Access-Control-Allow-Headers: Content-Type"); |
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
export default class Calculator { | |
soma (a, b) { | |
return a + b | |
} | |
diminuicao (a, b) { | |
return a - b | |
} | |
multiplicacao (a, b) { |
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
1º Crie a pasta do projeto. | |
ex: mkdir -p /var/www/html/example.com/public_html | |
1º Adicione permissão ao projeto | |
sudo chown -R $USER:$USER /var/www/example.com/public_html | |
3º Copie as configuraçes default para um arquivo com o nome do projeto | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf | |
4º Adicione essa configuração no arquivo .conf criado |
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 | |
session_start(); | |
$id = !empty($_SESSION['id']) ? $_SESSION['id'] : null; | |
session_regenerate_id(true); | |
if (!empty($_SESSION['id'])) { | |
$_SESSION['id'] = $id; //utilizo para outras coisas |