Skip to content

Instantly share code, notes, and snippets.

View RodrigoEspinosa's full-sized avatar
:bowtie:
 

Rodrigo Espinosa Curbelo RodrigoEspinosa

:bowtie:
 
View GitHub Profile
@RodrigoEspinosa
RodrigoEspinosa / mov-to-gif.sh
Last active February 11, 2020 17:37
Alias for OS X Screencast to animated GIF
mov-to-gif() {
ffmpeg -i $1 -vf "scale=1024:-1:flags=lanczos" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=0 --delay=7 #
}
@RodrigoEspinosa
RodrigoEspinosa / decorators.py
Created May 12, 2015 13:34
Cache for Django model properties.
from __future__ import unicode_literals
import functools
from django.core.cache import cache
class cached(object):
"""Save the return of the function on the cache.
"""