Skip to content

Instantly share code, notes, and snippets.

View DiegoPinho's full-sized avatar

Diego Martins de Pinho DiegoPinho

View GitHub Profile
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.bulkInsert(
"localidade",
[
{
nome_localidade: "Localidade 10",
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.bulkInsert(
"locais",
[
{
usuario_id: 9,
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.bulkInsert(
"usuario",
[
{
nome_completo: 'Java',
@DiegoPinho
DiegoPinho / exercícios.md
Last active May 22, 2024 14:20
Exercícios de HOFs (map, forEach e filter)

Exercícios

Nestes exercícios iremos exercitar os métodos auxiliares para array:

  • forEach
  • map
  • filter

Exercício 1 - Par ou ímpar?

Altere o código a seguir para utilizar a função forEach de modo que a saída permaneça a mesma.

@DiegoPinho
DiegoPinho / .gitconfig
Created February 24, 2022 21:06
Arquivo de configuração Git - Meld
[user]
name = seunomeaqui
email = seuemailaqui@gmail.com
[core]
editor = notepad
[merge]
tool = meld
keepBackup = false
[mergetool]
keepBackup = false
window.onload = function() {
console.log("carregando arquivo...");
var canvas = document.getElementById("canvas");
var boneco = document.getElementById("boneco");
var ctx = canvas ? canvas.getContext("2d") : null;
var bonecoCoord = {
x: 25,
y: 200
}
var charactersList = document.getElementById('charactersList');
var searchBar = document.getElementById('searchBar');
var hpCharacters = [];
/* código novo */
function pesquisar() {
var termosDaBusca = document.getElementById("searchBar").value;
var filteredCharacters = hpCharacters.filter((character) => {
return (
character.body.toLowerCase().includes(termosDaBusca) ||
@DiegoPinho
DiegoPinho / arquivoDeExemplo.json
Last active August 20, 2020 20:57
arquivo json da móbile
[
{
"title":"Semana 1 - 30.01 a 31.01",
"created_at":"2020-01-29T18:41:42Z",
"url":"semana-1-29-dot-01-a-31-dot-01",
"editing_roles":"teachers",
"page_id":15731825,
"last_edited_by":{
"id":9440764,
"display_name":"Vitor Hugo Melo De Almeida",
[
{
"title":"Semana 1 - 29.01 a 31.01",
"created_at":"2020-01-29T18:41:42Z",
"url":"semana-1-29-dot-01-a-31-dot-01",
"editing_roles":"teachers",
"page_id":15731825,
"last_edited_by":{
"id":9440764,
"display_name":"Vitor Hugo Melo De Almeida",
@DiegoPinho
DiegoPinho / index.html
Last active May 11, 2020 17:57
Exercício - 8° Ano
<html>
<head>
<title>As 4 estações</title>
</head>
<body>
<h1>Estações do ano</h1>
<p>O ano é dividido em quatro estações:</p>
<ul>
<li>Primavera</li>
<li>Verão</li>