Skip to content

Instantly share code, notes, and snippets.

View lubien's full-sized avatar
💭
Teaching people 🔥🦩 LiveView 🔥🦩

Lubien lubien

💭
Teaching people 🔥🦩 LiveView 🔥🦩
View GitHub Profile
// @ts-check
//
// The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion when
// implementing this exercise.
const WEEK_DAYS = 7
/**
* Calculates the total bird count.
// @ts-check
//
// The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion when
// implementing this exercise.
/**
* Determines whether or not you need a licence to operate a certain kind of vehicle.
*
* @param {string} kind
// @ts-check
/**
* Retrieve card from cards array at the 0-based position
*
* @param {number[]} cards
* @param {number} position
*
* @returns {number} the card
*/
// @ts-check
//
// ☝🏽 The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion on the web
// and supported IDEs when implementing this exercise. You don't need to
// understand types, JSDoc, or TypeScript in order to complete this JavaScript
// exercise, and can completely ignore this comment block and directive.
//
// 👋🏽 Hi again!
//
@lubien
lubien / fontes-de-vagas.md
Last active January 22, 2025 13:26
Fontes de vagas (Atualizado 2024-01-18 17:41)
@lubien
lubien / gist:6cc0c52ebae2f0a4d93c8fd45aca901e
Last active August 13, 2020 12:07
Files from last build
git diff --name-only 1ff0f508a HEAD > foo.txt
function defaultDirtyForForm(form) {
return Object.keys(form).reduce((acc, key) => {
acc[key] = false;
return acc;
}, {});
}
const WithForm = defaultForm => {
const fields = Object.keys(defaultForm());
<template>
<div class="card">
<div class="card-body">
<h4 class="card-title">
{{ isEditing ? "Editando tag" : "Criando Tag" }}
</h4>
<form @submit.prevent="onSubmit" class="forms-sample">
<b-form-group v-if="entity" :disabled="true" label="ID">
<b-form-input :value="entity.id"></b-form-input>