Skip to content

Instantly share code, notes, and snippets.

Diego Martins de Pinho DiegoPinho

Block or report user

Report or block DiegoPinho

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DiegoPinho
DiegoPinho / script.js
Created Dec 4, 2018
Avanade Academy | JulianaAugusta/github-wars
View script.js
var urlString = window.location.href;
var url = new URL(urlString);
var usuario1 = url.searchParams.get("user1");
var usuario2 = url.searchParams.get("user2");
document.getElementById('jogador1').innerHTML = usuario1;
document.getElementById('jogador2').innerHTML = usuario2;
fotoUsuario1 = document.getElementById('img_user1');
fotoUsuario2 = document.getElementById('img_user2');
@DiegoPinho
DiegoPinho / app.js
Last active Dec 4, 2018
Avanade Academy - MariaSilvania/BatalhaGitHub
View app.js
document.getElementById("button-ok").addEventListener("click", function () {
event.preventDefault();
var primeiroJogador = document.getElementById("input-jogador-1").value;
var segundoJogador = document.getElementById("input-jogador-2").value;
pegarUser(primeiroJogador, 'jogador-1');
pegarUser(segundoJogador, 'jogador-2');
});
function requisicao(metodoHTTP, url, callback) {
var xhttp = new XMLHttpRequest();
View escolamobile.js
function findMajorPalindromFor(digits) {
var n1 = Math.pow(10, digits) - 1;
for(var n2 = n1; n2 => 0; n2--) {
var value = n1 * n2;
if(isPalindrom(value)) {
console.log(`${n1} x ${n2} = ${value}`);
break;
}
}
}
View conexao.js
// instância do MongoClient
const MongoClient = require('mongodb').MongoClient;
// conexão com o banco de dados remoto exemplomlab
const url = 'SUA_URL_AQUI';
MongoClient.connect(url, (err, db) => {
if(!err) {
console.log('Conectado');
}
View gama-2.html
<!DOCTYPE html>
<html>
<head>
<title>Flexbox</title>
<meta charset="utf-8" />
<style>
.container {
border: 2px solid black;
display: flex;
View gama-1.html
<!DOCTYPE html>
<html>
<head>
<title>Escolinha da Bagunça</title>
<meta charset="utf-8" />
<meta name="description" content="notas escolares dos alunos da escolinha do barulho">
<meta name="keywords" content="escolinha do barulho, escolinha, média">
<style>
table, th, td {
border: 1px solid black;
@DiegoPinho
DiegoPinho / react-bootstrap.js
Last active Jun 18, 2018
react-bootstrap.js
View react-bootstrap.js
const Jumbotron = ReactBootstrap.Jumbotron;
const Button = ReactBootstrap.Button;
const App = () => {
return (
<Jumbotron>
<h1>Olá!</h1>
<p>
Este é um exemplo do Componente Jumbotron construído com o
React-Boostrap!
View sticker.js
/**
* Sticker.js: A Javascript library that allows you to create a Sticker Effect
*
* @project-site http://stickerjs.cmiscm.com/
* @repository https://github.com/cmiscm/stickerjs
* @author Jongmin Kim - cmiscm.com
* @version 1.0 (2014/02/05)
* @license MIT License
*/
(function(){var m,b=null,h=["webkit","Moz","ms","O"],d="all 0.6s cubic-bezier(.23,1,.32,1)",j="all 0s",e=document.createElement("style");e.appendChild(document.createTextNode(" .shadowL {background: -moz-linear-gradient(right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.01) 1%, rgba(0,0,0,0.7) 100%);background: -webkit-gradient(linear, right top, left top, color-stop(0%,rgba(0,0,0,0)), color-stop(1%,rgba(0,0,0,0.01)), color-stop(100%,rgba(0,0,0,0.7)));background: -webkit-linear-gradient(right, rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0,0,0.7) 100%);background: -o-linear-gradient(right, rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0,0,0.7) 100%);background: -ms-linear-gradient(right, rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0
View reveal.js
Reveal.initialize({
// Display presentation control arrows
controls: true,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,
// Determines where controls appear, "edges" or "bottom-right"
@DiegoPinho
DiegoPinho / exemplo-props.js
Created May 10, 2018
Exemplo de componente com propriedades - UNIVEM
View exemplo-props.js
const App = () => {
return (
<Pessoa nome = "Diego Martins de Pinho" />
)
}
const Pessoa = (props) => {
return (
<p><b>Nome: </b>{props.nome}</p>
)
You can’t perform that action at this time.