Skip to content

Instantly share code, notes, and snippets.

View mloureiro's full-sized avatar
🤘

Marcos Loureiro mloureiro

🤘
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mloureiro on github.
  • I am mloureiro (https://keybase.io/mloureiro) on keybase.
  • I have a public key ASC0frQK3U3RKK6_VjTgg1h2So5vtaLqI8_gba72T5hGxwo

To claim this, I am signing this object:

How to facilitate a retrospective

The role of Facilitator is fundamental for almost every meeting. The Facilitator ensures that the whole group is empowered to make decisions and that every individual has their voice heard.

During a retrospective, the Facilitator role is crucial. In a retrospective, it is ideal that everyone has at least some degree of participation, and it is the Facilitator that helps the participants with that.

@mloureiro
mloureiro / oneliners.js
Created April 4, 2019 07:50 — forked from mikowl/oneliners.js
👑 Awesome one-liners you might find useful while coding.
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.
@mloureiro
mloureiro / array-fill-with-generator-and-sorting.js
Created April 30, 2018 07:28
Test execution time of Array.fill() vs Array.push()
function generator() {
let id = 0;
return () => id++;
}
function arrayFill(times, generator, sortFn = () => 0) {
return Array(times)
.fill(null)
.map(generator)
.sort(sortFn);
#!/usr/bin/env bash
# Usage: {script} PATH
# Construct a commit message for use with rebase --autosquash.
# The commit message will be the subject line from the specified commit with a prefix of "fixup! " and will contain the
# changes on the PATH.
#
# --help, -h Displays this help
#
# Report bugs to Henrique Moody <henriquemoody@gmail.com>
#
@mloureiro
mloureiro / test.js
Last active February 28, 2018 16:05
Array deduplication using Object or Array.includes() or Array.indexOf()
function clearDuplicatesUsingArrayIncludes(array) {
const existing = [];
return array.filter((el) => {
if (existing.includes(el)) {
return false;
}
existing.push(el);
return true;
@mloureiro
mloureiro / ws_n.pl
Created October 29, 2016 13:25
Elasticsearch synonym file
This file has been truncated, but you can view the full file.
s(100001740,1,'entity',n,1,11).
s(100001930,1,'physical entity',n,1,0).
s(100002137,1,'abstraction',n,6,0).
s(100002137,2,'abstract entity',n,1,0).
s(100002452,1,'thing',n,12,0).
s(100002684,1,'object',n,1,51).
s(100002684,2,'physical object',n,1,0).
s(100003553,1,'whole',n,2,0).
s(100003553,2,'unit',n,6,0).
s(100003993,1,'congener',n,3,0).
@mloureiro
mloureiro / meta-tags.md
Created October 25, 2016 18:29 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@mloureiro
mloureiro / script.php
Last active October 9, 2015 22:29
Make all available options from a demanded list
<?php
$sections = [
'bread' => [
'multichoice' => false,
'options' => ['normal','wrap']
],
'salad' => [
'multichoice' => true,
'options' => ['lettuce','tomatoes', 'corn']
@mloureiro
mloureiro / googleSignedUrls.php
Last active June 19, 2016 11:46
Generate a Google Signed URL
<?
/**
* Google Bucket GET file with signed string example
*/
require_once("vendor/autoload.php");
/*
* Helper Methods
*/