Skip to content

Instantly share code, notes, and snippets.

View jonykalavera's full-sized avatar

Luis Fernando Villanueva Pérez jonykalavera

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonykalavera on github.
  • I am jonykalavera (https://keybase.io/jonykalavera) on keybase.
  • I have a public key whose fingerprint is 0856 7837 7176 EED6 17EE 9D17 338A 2A63 42EF 821C

To claim this, I am signing this object:

@jonykalavera
jonykalavera / tags.py
Last active December 18, 2015 23:49 — forked from bohde/tags.py
from taggit.utils import parse_tags # with this you can accept tags as a string to be parsed :)
from tastypie.fields import ListField
class TaggedResource(ModelResource):
tags = ListField()
class Meta:
queryset = Model.objects.all()
def build_filters(self, filters=None):
@jonykalavera
jonykalavera / set-prompt.sh
Last active April 26, 2016 23:56
Kalavera Custom Prompt with git branch
#custom prompt
export PS1='\[\e[01;30m\]\t`if [ $? = 0 ]; then echo "\[\e[32m\] ✔ "; else echo "\[\e[31m\] ✘ "; fi`\[\e[00;37m\]\u\[\e[01;37m\]:`[[ $(git status 2> /dev/null | head -n2 | tail -n1) != "# Changes to be committed:" ]] && echo "\[\e[31m\]" || echo "\[\e[33m\]"``[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] || echo "\[\e[32m\]"`$(__git_ps1 "(%s)\[\e[00m\]")\[\e[01;34m\]\w\[\e[00m\]\$ '