This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LANG=en_US.UTF-8 | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/francisco/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
" PLUGINS: | |
" ----------------------------- | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultLocale = "default"; // falls back to user's locale using the string "default" | |
const getMonthName = (date, { locale = defaultLocale, format = "long" }) => { | |
let result = date.toLocaleString(locale, { | |
month: format, | |
}); | |
// Fix for ES: make first letter uppercase and remove trailing "." | |
return result.slice(0, 1).toUpperCase() + result.slice(1).replace(/\.$/, ""); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i,900,900i);@font-face{font-family:filmin;src:url(../fonts/filmin-custom/big/filmin-big.eot);src:url(../fonts/filmin-custom/big/filmin-big.eot?#iefix) format("embedded-opentype"),url(../fonts/filmin-custom/big/filmin-big.woff) format("woff"),url(../fonts/filmin-custom/big/filmin-big.ttf) format("truetype"),url(../fonts/filmin-custom/big/filmin-big.svg#filmin) format("svg");font-weight:400;font-style:normal}@font-face{font-family:filmin-small;src:url(../fonts/filmin-custom/small/filmin-small.eot);src:url(../fonts/filmin-custom/small/filmin-small.eot?#iefix) format("embedded-opentype"),url(../fonts/filmin-custom/small/filmin-small.woff) format("woff"),url(../fonts/filmin-custom/small/filmin-small.ttf) format("truetype"),url(../fonts/filmin-custom/small/filmin-small.svg#filmin) format("svg");font-weight:400;font-style:normal}@-webkit-keyframes spinner{0%{transform:scale(.5) rotate(0deg)}to{transform:scale(.5) rotate(1turn)}}@keyf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Usage: ./git-diff {commit_id_or_tag_name_or_branch_name} | |
git --no-pager diff --compact-summary --stat=255 --diff-algorithm=minimal --name-status %1 HEAD >> diff.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Returns the contents of $stm (PDO Statement) | |
// as an associative array, with correct native types | |
// for integers, nulls, and floats | |
$array = []; | |
while ($fila = $stm->fetch(\PDO::FETCH_ASSOC)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* el(tag, options[, innerHTML]) | |
* Creates an HTMLElement object | |
* and fills it with various attributes and properties. | |
* Inspired by React's `React.createElement()` function | |
* | |
* @param string tag The element's tagname, such as P, DIV, etc. | |
* @param object options | |
* An object that can contain key-value pairs of attributes such as | |
* "aria-label", "itemtype", "disabled", etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- facebook open graph & google tags (this also works for twitter) --> | |
<!-- This are usefull mostly for machines. --> | |
<meta property="og:url" content="https:{{ .Permalink }}" /> | |
<!-- es_AR means "spanish from Argentina". Not really supported, though. That's why there's a fallback --> | |
<meta property="og:locale" content="es_AR" /> | |
<meta property="og:locale:alternate" content="es_LA" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calculateTotalOffsetTop (elem, total){ | |
total = total || 0; | |
total = elem.offsetTop + total; | |
if (elem.offsetParent) return calculateTotalOffsetTop(elem.offsetParent, total) | |
else return total; | |
} | |
function calculateTotalOffsetLeft (elem, total){ | |
total = total || 0; | |
total = elem.offsetLeft + total; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div ref="element" v-html="text"></div> | |
</template> | |
<script> | |
import MediumEditor from 'medium-editor' | |
// impure helper function, replaces some element from the dom with a new one of the given tag name | |
// returns the new one. |
NewerOlder