Skip to content

Instantly share code, notes, and snippets.

View fpinzn's full-sized avatar

Francisco Pinzón fpinzn

  • Bogotá, Colombia
View GitHub Profile
@fpinzn
fpinzn / PROCESS.md
Last active October 8, 2020 04:49
## Average life of all PRs in the organization
  1. Auth

Simple auth using a token retrieved from the github ui.

curl -u fpinzn:token https://api.github.com/user

  1. Get all PRs from a repo https://api.github.com/repos/vlipco/waybox-api/pulls

  2. Get all repos from an organization

@fpinzn
fpinzn / nested_config_not_working.rb
Created June 28, 2018 17:48
dry-validation nested config inside rules not working
InnerSchema = Dry::Validation.Schema do
configure do
option :letter_array
end
required(:letter).filled(:str?)
validate(letter_in_array: :letter) do |letter|
letter_array.include?(letter)
end
@fpinzn
fpinzn / keymap.cson
Created October 27, 2017 00:32
Move to next pane using alt-tab
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#

Guia de estilo de contenidos de La Petite Table

Este documento describe el conjunto de buenas practicas a ser seguidas en la administración de la aplicación web de La Petite Table. La lista de reglas debe ser seguida en todo momento. El espíritu de esta guia es ser coherente con las buenas costumbres ideomáticas y respetar el diseño de la aplicación a través del ajuste de los contenidos que alimentan el website.

La buena ortografía es vital para transmitir una sensación de calidad en la marca de LPT.

1. Fotos

1.1 Fotos de los Chefs

@fpinzn
fpinzn / pprogress.js
Created April 5, 2015 09:04
Progress bar for node that will use the whole width of the output buffer by default.
var ProgressBar = require('progress');
/*
`events` are for higher levels to call, `ticks` are progress bar marks.
an `event` can be a downloaded chunck of a file or an archived copied.
*/
var event2tickRatio, currentTickCount = 0, ticksMarked = 0;
// progress bar that occupies whole buffer window.
var pB = new ProgressBar(':bar', { total: process.stdout.columns });
@fpinzn
fpinzn / color-conventions
Created March 13, 2015 01:02
Colors to Maximize salience on a white background
#F8D757
#311F55
#ED4E1A
#98E1E3
#EA2B12
#FAEB95
#6BC35F
#EFA7BA
#2872BB
#F5C79B
@fpinzn
fpinzn / Currency formatter angular.js directive
Created February 17, 2015 02:46
currency directive to prepend a $ signto the value and add . every three digits. The model value stays without these ornaments.
module.directive('currency', function () {
return {
require: 'ngModel',
link: function(elem, $scope, attrs, ngModel){
$scope.addPoints = function(val){
console.log("formater points", val);
var count = 0, result;
return _.reduceRight(val, function(memo, item){
{head, group-by, lines, take-while} = require 'prelude-ls'
fs = require 'fs'
#aliases
CL = console.log
#returns the lines in the N level of indentation
# Usage: indentificator file [level]
# If no level is provided all levels will be printed
# TODO: receive char-value (tab-space equivalency)as an arg of the program
char-value = {'\t': 1, ' ': 0.5}
#!/bin/sh
# Displays the received arguments as options and returns the option selected
# Set the prompt for the select command
PS3="Type a number or 'q' to quit: "
# Show a menu and ask for input. If the user entered a valid choice return it.
select option in "$@"; do
if [ -n "$option" ]; then
echo ${option}
#!/bin/bash
set -eo pipefail
# This should be a cd to a env var with the root of the notes directory
nhome=~/versioned/Notes/nValt
file=".note.searching.$RANDOM"
#Search the files contents
pushd $nhome
ag "$@" > $nhome/$file
#Search the file names
ls | ag "$@" >> $nhome/$file