// There is a route, like this
var route = {
method: 'GET',
path: '/{agencyDomain}',
handler: handler.home,
config: {
pre: [ {
method: somePreMethod,
assign: 'somePreMethod'
// HapiJS server directory layout | |
└── server | |
├── config // Confidence config | |
├── index.js // Server entry point | |
├── methods // Server methods | |
├── plugins // All your plugins | |
├── routes // All your routes and pre's | |
│ └── route | |
│ ├── pre // route pre-requisites |
'use strict'; | |
console.log('------------------Let------------------------'); | |
let x = 5; | |
console.log( 'START scope global > x', x ); | |
function pruebaLet(){ | |
let x = 2; | |
console.log( '\tscope prueba Let' ); | |
console.log( '\tx >', x ); | |
if (true){ |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" deka | |
" Based on the Awesome vimrc project by Amir Salihefendic | |
" https://github.com/amix/vimrc | |
" | |
" Sections: | |
" -> General | |
" -> VIM user interface | |
" -> Colors and Fonts |
export CLICOLOR=1 | |
# Set colors to match iTerm2 Terminal Colors | |
export TERM=xterm-256color | |
export NVM_DIR="/Users/deka/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
source ~/.git-completion.bash |
To be used on concurrency notes/post:
About thundering herd problem:
- https://lkml.org/lkml/2004/5/2/108
- http://www.citi.umich.edu/projects/linux-scalability/reports/accept.html (possible linux solution)
- https://en.wikipedia.org/wiki/Lock_convoy
About exponential backoff (lil bit related to thundering -can cause it?-):
En este articulo vamos a ver los conceptos de composición y plugin. Vamos a relacionarlos usando el framework Choo teniendo como objetivo la creación de un componente nuevo que otrxs tal vez pueden usar.
Choo es un framework para construir aplicaciones web (otro mas 😁), que tiene como objetivo simplificar el desarrollo e incluso hacerlo divertido. Esto lo podemos ver reflejado en su filosofia [Ref: Choo#Philosophy]. Pero ¿Cómo logra choo simplificar este proceso? Bueno, alguna de las estrategias que Yoshua Wuyts (autor, desarrollador principal) y colaboradores eligen son: mantener una base de código pequeña (1 solo archivo, con dependencias por supuesto), apoyarse en un sistema de eventos y mantener una superficie de API reducida. Pero estas son tan solo algunas características, si desean conocer mas sobre choo hace un tiempo dí una charla llamada: [Choo, el pequeño fram
const P2PCommons = require('.') // liberate science constructor function | |
const tempy = require('tempy') | |
const commons = new P2PCommons({ baseDir: tempy.directory(), verbose: true }) | |
process.once('SIGINT', () => commons.destroy()) | |
;(async () => { | |
await commons.ready() | |
// create some content | |
const { rawJSON, metadata } = await commons.init({ | |
type: 'content', |
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d` |
I hereby claim:
- I am dpaez on github.
- I am carax (https://keybase.io/carax) on keybase.
- I have a public key ASBTYeB2azqpGbUsWMgFQWiIyo0SuoRaHtRgOPvdPtjhQAo
To claim this, I am signing this object: