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 os | |
import sys | |
import subprocess | |
def main(): | |
if len(sys.argv) != 2: | |
print("Uso: python script.py <BRANCH_NAME>") | |
sys.exit(1) | |
branch_name = sys.argv[1] |
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
// Seleção de elementos | |
const todoForm = document.querySelector("#todo-form"); | |
const todoInput = document.querySelector("#todo-input"); | |
const todoList = document.querySelector("#todo-list"); | |
const editForm = document.querySelector("#edit-form"); | |
const editInput = document.querySelector("#edit-input"); | |
const cancelEditBtn = document.querySelector("#cancel-edit-btn"); | |
let oldInputValue; |
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
/* Geral */ | |
* { | |
padding: 0; | |
margin: 0; | |
font-family: Helvetica; | |
color: #333; | |
box-sizing: border-box; | |
} | |
body { |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Todo Avançado</title> | |
<!-- CSS do projeto --> | |
<link rel="stylesheet" href="css/styles.css"> | |
<!-- Font Awesome --> |
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
function handleMessages(filter) { | |
const valuesAlreadySent = [] | |
const interval = setInterval(() => { | |
if (valuesAlreadySent.length >= Object.keys(filter).length) { | |
clearInterval(interval) | |
return | |
} | |
const div_message = document.querySelectorAll('div[data-message-text]') |
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
const fs = require('fs'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); |
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
function _validateCPF( | |
value: string, | |
handleResponse: (value: Record<string, unknown>) => void | |
): void { | |
let data = {}; | |
let sum; | |
let rest; | |
sum = 0; | |
if (value === '000.000.000-00') { |
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
/** Type Allias e Union */ | |
function logDetails(uid: number | string, item: string) { | |
console.log(`A product with ${uid} has a title as ${item}`) | |
} | |
// uid: number | string => union | |
logDetails(123, 'sapato') | |
logDetails('123', 'sapato') |
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
/** Type Inference */ | |
let title = 'title' | |
title = 1 // dont work | |
title = 'lol' // work |
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
// boolean (true / false) | |
let isOpen: boolean | |
isOpen = true | |
// string ('foo', "foo", `foo`) | |
let message: string | |
message = `foo ${isOpen}` | |
// number | |
let total: number |
NewerOlder