Skip to content

Instantly share code, notes, and snippets.

View ecancino's full-sized avatar

Eduardo Cancino ecancino

View GitHub Profile
@ecancino
ecancino / pronunciation.md
Created April 5, 2024 15:22 — forked from nuno-andre/pronunciation.md
How to pronounce...
term [IPA][I] [respelling][r] notes
[ASIC][asic] /ˈeɪsɪk/ [source][asic]
[Bash][B] /bæʃ/ bash [source][B-1]
[CAPTCHA][cap] /kæp.tʃə/ kap-TCHA [source][cap]
[cout][c] see-out [✓ source][c-1]
[char][ch] /tʃɑr/ tchar [source][ch-1]
[deque][dq] /:dek/ deck
[etcd][e] /ˈɛtsiːdiː/ ET-see-dee [✓ source][e-1]
[fsck][f] fisk [✓ source][f-1], [alt][f-2]
@ecancino
ecancino / stash_dropped.md
Created May 1, 2020 01:47 — forked from joseluisq/stash_dropped.md
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik

Concepts

  • Immutable Data
  • Second-order Functions
@ecancino
ecancino / curry.js
Created May 25, 2017 20:22 — forked from amatiasq/curry.js
Simple way to recursively curry javascript functions http://jsfiddle.net/amatiasq/osrsomq0/
/**
* @param {Function} fn Function to curry.
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length
* @returns {Function} The currified function.
*/
function curry(fn, length) {
length = length || fn.length;
return function currified() {
var args = [].slice.call(arguments);
const Task = require('data.task')
const Either = require('data.either')
const { Left, Right } = Either
const request = require('request')
const { List } = require('immutable-ext')
const { drop, prop, map } = require('lodash/fp')
const effect = f => x => {
f(x)
return x
@ecancino
ecancino / what-forces-layout.md
Created September 23, 2015 16:12 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@ecancino
ecancino / markdown.css
Last active May 26, 2017 13:37 — forked from imjasonh/markdown.css
Markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}