Skip to content

Instantly share code, notes, and snippets.

@danielesegato
danielesegato / _Serverless-Bash-Autocomplete.md
Last active July 25, 2016 19:43 — forked from davidgf/serverless
Bash completion for Serverless

To enable serverless bash completion:

  • Install serverless: npm -g serverless
  • Append the servereless.bash code to the .bashrc or .bash_profile file in your home directory

This gitst is a fork of https://gist.github.com/davidgf/5bd76141aa70f9ed4d8f716851e68830. It avoid using find .to look for lambda functions: the command, if executed in the root directory or a big directory, can be really bad for performances. It also add subcommand handling for non-functions.

The script instead look for the serverless project file s-project.json starting from the current directory and looking up,

@danielesegato
danielesegato / CreditCardFormatTextWatcher.java
Last active April 8, 2021 08:42 — forked from liberorignanese/MarginSpan.java
Android TextInputLayout with credit card mask
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.Editable;
import android.text.Spannable;
import android.text.TextWatcher;