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
Docker | |
PHP Debug | |
PHP DockBlocker | |
PHP Getters & Setters | |
PHP Intelephense |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
<script> | |
var carregando = false; | |
var paginaAtual = 1; | |
function carregarConteudo(pagina) { |
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 | |
static $values = array( 15.92, 53.27, 244.28, 388.46, 3.14, 2.92, 18.22, 4.03 ); | |
static $expected = 297.55; | |
static $precision = 100; /* para não ter problemas com ponto flutuante */ | |
$target = floor( $expected * $precision ); | |
$len = count( $values ); | |
for( $i = 1; $i < pow( 2, $len ); $i++ ) { | |
$soma = 0; | |
$set = array(); |
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
https://pt.slideshare.net/andrewrota/integrating-reactjs-into-a-php-application |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redux basic example</title> | |
<script src="https://unpkg.com/redux@latest/dist/redux.min.js"></script> | |
</head> | |
<body> | |
<h2>Itens</h2> | |
<button class="item">Apple</button> | |
<button class="item">Banana</button> |
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
<script> | |
function fetchPhotos() { | |
return fetch('https://jsonplaceholder.typicode.com/photos'); | |
} | |
function fetchPhoto(id) { | |
return fetch('https://jsonplaceholder.typicode.com/photos/' + id); | |
} |
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
<script> | |
function getSalary(salary) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(salary); | |
}, 500); | |
}); | |
} |
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
https://mediatemple.net/community/products/dv/204643810/how-do-i-disable-ssh-login-for-the-root-user |
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
mkdir -p /home/user/.ssh | |
ssh-keygen -t rsa | |
touch /home/user/.ssh/authorized_keys | |
touch /home/user/.ssh/known_hosts | |
chown -R user:user /home/user/.ssh | |
chmod 700 /home/user/.ssh | |
chmod 600 /home/user/.ssh/id* | |
chmod 644 /home/user/.ssh/id*.pub | |
chmod 644 /home/user/.ssh/authorized_keys | |
chmod 644 /home/user/.ssh/known_hosts |
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
https://serversforhackers.com/c/nginx-caching |
NewerOlder