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
{ | |
"starts test template": { | |
"prefix": "e2e", | |
"body": [ | |
"import ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} from '../page-objects/${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}'", | |
"import General from '../page-objects/General'", | |
"", | |
"describe('${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} Tests', () => {", | |
" const $TM_FILENAME_BASE = new ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}()", | |
" const general = new General()", |
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
{ | |
"bring back the scaffold to vue files": { | |
"prefix": "scaffold", | |
"body": [ | |
"<template>", | |
" <div>$TM_FILENAME_BASE</div>", | |
"</template>", | |
"", | |
"<script>", | |
"export default {", |
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
<template> | |
<form> | |
<label for="email">Email</label> | |
<input type="email" id="email" name="email" v-model="email" /> | |
<label for="senha">Senha</label> | |
<input type="password" id="senha" name="senha" v-model="senha" /> | |
</form> | |
</template> |
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 threading # essa é a biblioteca responsável pela crianção das threads | |
from datetime import datetime # biblioteca usada para pegar o tempo do sistema | |
def nao_passou_dois_segundos(tempo_inicial, tempo_final): | |
# verifica se o tempo no sistema agora é igual ao tempo inicial + o tempo que eu quero (nesse caso seria o tempo inicial + 2 segundos) | |
if(datetime.now().second == (tempo_inicial + tempo_final)): | |
# caso sim, retorna falso e para a thread | |
return False | |
else: |
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
let num = 24674 | |
const formattedNum = num.toFixed(0).replace(/(\d)(?=(\d{3})+$)/g, "$1.") // if you want to use commas instead of dots, you can | |
// replace the "$1." to "$1," | |
console.log(formattedNum) // 24.674 |
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 scrollIt(destination, duration = 200, easing = "linear", callback) { | |
const easings = { | |
linear(t) { | |
return t; | |
}, | |
easeInQuad(t) { | |
return t * t; | |
}, | |
easeOutQuad(t) { | |
return t * (2 - t); |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<a href="#reference" class="styled-down">Click Me</a> |
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
$l-device: 1200px; | |
$m-device: 760px; | |
$s-device: 480px; | |
@mixin d($size) { | |
@if $size == l { | |
@media screen and (min-width: #{$l-device}) { | |
@content; | |
} | |
} |
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
// $pixel - number to be converted on em | |
// $context: font-size base (most browsers use 16px) | |
@function em($pixel, $context: 16) { | |
@return $pixel / $context + em; | |
} |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<svg class="icon__book" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 45.1"> |
NewerOlder