This file contains hidden or 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 | |
require_once 'pdo.php'; | |
# ------------------------------------------------------------------------------ DELETE | |
$cpf = '12974732720'; | |
$sql = 'DELETE FROM pessoa WHERE cpf = :cpf'; | |
$stmt = $pdo->prepare($sql); | |
$stmt->bindParam(':cpf', $cpf); | |
$result = $stmt->execute(); |
This file contains hidden or 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.0. ADICIONAR ISSO AO FINAL DO ARQUIVO DE CONFIGURAÇÃO DO APACHE: | |
Alias /.well-known /home/teste/public_html/.well-known | |
2.0. TERMINAL | |
$ cd /home/USER/ | |
$ git clone https://github.com/letsencrypt/letsencrypt; cd ./letsencrypt/ | |
$ ./letsencrypt-auto certonly --email EMAIL --agree-tos --webroot --renew-by-default -w /home/USER/public_html/ -d DOMINIO --authenticator webroot | |
$ cp -f /etc/letsencrypt/live/DOMINIO/* /home/USER/ssl_certs/ |
This file contains hidden or 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
<form action="login.php" method="post"> | |
login: <input type="text" name="login" placeholder="Só para fins demonstrativos. Não tem função."/><br/> | |
senha: <input type="password" name="senha" placeholder="Só para fins demonstrativos. Não tem função."/><br/> | |
<input type="submit" value="logar"/> | |
</form> | |
<br/> | |
<a href="secret_page.php">secret page</a> |
This file contains hidden or 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
http://awesome-br.com/#/laravel | |
https://medium.com/@luizvinicius73/trabalhando-com-seeds-no-laravel-5-142829ddc32e#.ch2glyg7m | |
https://medium.com/@luizvinicius73/como-organizar-painel-e-front-no-laravel-5-3409d037c5ee#.po2mfsc9k | |
https://medium.com/@luizvinicius73/por-que-facades-%C3%A9-um-problema-seu-e-n%C3%A3o-do-laravel-8672bb80c74c#.lyw503qhi | |
https://laravel.com/docs/5.1/quickstart | |
https://codecasts.com.br/lesson/configuracao-inicial | |
http://artesaos.github.io/howto/ | |
Estudar (MUITO) Eloquent |
This file contains hidden or 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 | |
/** | |
* A base model with a series of CRUD functions (powered by CI's query builder), | |
* validation-in-model support, event callbacks and more. | |
* | |
* @link http://github.com/jamierumbelow/codeigniter-base-model | |
* @copyright Copyright (c) 2012, Jamie Rumbelow <http://jamierumbelow.net> | |
*/ | |
class MY_Model extends CI_Model |
This file contains hidden or 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 | |
/** | |
* Encrypt Controller | |
* | |
* You can set the key to encode/decode. | |
* | |
* @uses CodeIgniter's Encrypt Class | |
* @see http://www.codeigniter.com/user_guide/libraries/encrypt.html | |
* @author John Dias <[email protected]> | |
*/ |
This file contains hidden or 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
echo 'deb http://packages.dotdeb.org wheezy-php56 all' >> /etc/apt/sources.list | |
echo 'deb-src http://packages.dotdeb.org wheezy-php56 all' >> /etc/apt/sources.list | |
gpg --keyserver keys.gnupg.net --recv-key 89DF5277 | |
gpg -a --export 89DF5277 | sudo apt-key add - | |
apt-get update | |
apt-get upgrade -y |
This file contains hidden or 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
#!/bin/bash | |
path_oc='/root/owncloud' | |
path_files=${path_oc}'/data/jaonoctus/files' | |
user='bkp' | |
group='bkp' | |
cd $path_oc | |
chown -R ${user}:${group} ${path_files}/ | |
chmod 777 -R ${path_files}/* | |
sudo -u bkp php occ files:scan --all |
This file contains hidden or 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
#!/bin/bash | |
# Add packages | |
echo 'deb http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list | |
echo 'deb-src http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list | |
# Add GPG Key | |
wget https://www.dotdeb.org/dotdeb.gpg | |
apt-key add dotdeb.gpg |
This file contains hidden or 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 | |
class Payment | |
{ | |
public $name; | |
private $tax; | |
private $add; | |
public function __construct(string $name, float $tax, float $add = 0) | |
{ |