Skip to content

Instantly share code, notes, and snippets.

View Babali42's full-sized avatar
🕸️
Go on drumbeatrepo make some noise

Baptiste Lyet Babali42

🕸️
Go on drumbeatrepo make some noise
View GitHub Profile
@soaxelbrooke
soaxelbrooke / example_file_input.rs
Created August 23, 2020 04:05
Example Handling Input Files With Yew
use yew::events::ChangeData;
use yew::web_sys::File;
use yew::prelude::*;
pub struct MyFileInput {
link: ComponentLink<Self>,
file: Option<File>,
}
pub enum Msg {

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@pedrovgs
pedrovgs / FormValidationKata.md
Created March 30, 2019 16:36
Form validation kata statement

Most of our tasks as software engineers are related to forms. Sign up forms, sing in forms, onboarding forms, etc. So today we are going to practice how to validate any form data using accumulative errors so we can now in just one method invocation what are the errors our form contains.

Our task for today's practice is to write a program to be able to validate if the data contained in a form with the following information is valid or not.

  • First name: It can't be empty.
  • Lst name: It can't be empty.
  • Birthdate. It has to be, at least, 18 years old.
  • Document ID: A value containing eight digits and one letter.
  • Phone number: Any combination of 9 numbers.
  • Email: Any valid email.
@edwingustafson
edwingustafson / fizzbuzz.js
Last active April 3, 2025 22:04
FizzBuzz is RxJS
#!/usr/bin/env node
const fizz = "Fizz";
const buzz = "Buzz";
const fizzbuzz = `${fizz}${buzz}`;
const Rx = require('rxjs/Rx');
Rx.Observable.range(1,100)
.map(n => n % 15 === 0 ? fizzbuzz : (n % 3 === 0 ? fizz : (n % 5 === 0 ? buzz : n)))
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 20, 2025 06:36
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example