I hereby claim:
- I am lirsacc on github.
- I am lirsacc (https://keybase.io/lirsacc) on keybase.
- I have a public key ASD-QCh_GT6lEpNV8J9jtn7p7ZLqht2FYN-_TsyGEnci3wo
To claim this, I am signing this object:
# Helper function to run local npm packages with tab completion | |
# usage: npl pkg options | |
# Will return 1 if ./node_modules/ or ./node_modules/.bin/pkg doesn't exist | |
# Otherwise runs ./node_modules/.bin/pkg options | |
# Run local npm packages | |
# Better completion thanks to http://stackoverflow.com/a/14524311 | |
function _npl () { | |
local cur ff | |
if [ $COMP_CWORD -eq 1 ]; then | |
# First completion word -> list node modules with binary |
* | |
!Dockerfile |
#compdef db | |
local -a dbs | |
dbs=$(ls $HOME/.dbs) | |
_alternative "files:dbs:($dbs)" |
I hereby claim:
To claim this, I am signing this object:
Question was asked during the interview and this is implementation with notes left to be done separately.
Find the minimal subset of London tube stations whose characters cover all the letters of the alphabet. (Or more generally find the minimal subset of terms in a corpus that covers a given alphabet).
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" Small experiment with Python's operator overloading to add support for | |
composing function with the pipe operator similar to Elixir's pipe operator. | |
The main use case of such technique I see is to build isolated DSL. | |
This approach uses decorators to achieve the given result which forces you | |
to wrap all the functions you want to use this way. The runtime cost should | |
be minimal however this might be a problem in some context. It also prevents you |