Skip to content

Instantly share code, notes, and snippets.

View leonardovff's full-sized avatar
🎯
Focusing

Leonardo Victor leonardovff

🎯
Focusing
View GitHub Profile
@leonardovff
leonardovff / getWords.js
Created March 8, 2023 04:00
get unique words from long plan text
JSON.stringify(
Object.keys(X.replace(/\n/g, ' ')
.split(" ")
.filter(x => x != "")
.filter(x => !['1','2','3','4','5', '6','7','8','9','0'].includes(x)).filter(x => x.length != 1)
.reduce((acc, word) => ({...acc, [word]: true}), {}))
)
@leonardovff
leonardovff / am-participants-mock.interceptor.ts
Last active October 10, 2020 13:17
Base mock interceptor
import { Injectable } from '@angular/core';
import { HttpRequest, HttpResponse } from '@angular/common/http';
import { of, throwError } from 'rxjs';
import { BaseMockInterceptor, IMockResolve } from './base-mock.interceptor';
// import { ClientsData } from './client-data';
const AmParticipantsMockData = [{}];
@Injectable()
export class AmParticipantsMock extends BaseMockInterceptor {

Agenda

  1. Visão geral do controle de verso e git (15 mins)
  2. A sample git work flow (5 mins)
  3. Successful projects and their characteristics (5 mins)
  4. Recomendaçes (5 mins)
  5. Discussão and Q&A (15 mins)
  6. Git flow?
  7. Referências
@leonardovff
leonardovff / mergeAndSortTwoList.js
Created November 16, 2018 17:11
Merge and sort two different javascript list
// Definition for singly-linked list:
// function ListNode(x) {
// this.value = x;
// this.next = null;
// }
let last = false,
unified = false;
function mergeTwoLinkedLists(l1, l2, first = true) {
if(!l1){
@leonardovff
leonardovff / permutation.js
Created August 11, 2018 23:28
My first permutation algorithm
var data = [];
permutation = (arr, prefix = []) => {
if(arr.length == 2){
let comb1 = [...prefix],
comb2 = [...prefix];
comb1.push(arr[0]);
comb1.push(arr[1]);
data.push(comb1);
comb2.push(arr[1]);
comb2.push(arr[0]);
let info = {init: false};
let run = word => {
info = {
word: word,
letters: word.split(''),
discoveries: [],
correct: 0,
errors: 0,
limit_errors: 5,
}