Skip to content

Instantly share code, notes, and snippets.


Rodrigo Espinosa Curbelo RodrigoEspinosa

Block or report user

Report or block RodrigoEspinosa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am RodrigoEspinosa on github.
  • I am rec ( on keybase.
  • I have a public key whose fingerprint is 03EF 561A 10C2 77E6 1A76 EDDF AA1E BB6C 30D9 DA76

To claim this, I am signing this object:

# Based on
# Backup the content.
# TODO: Add date suffix.
cp -R ./content /tmp/content-backup
cp ./config.js /tmp/config.js-backup
# Download latest version of Ghost.
curl -LOk
View create-blessed-custom-widgets.js
var Blessed = require('blessed');
var screen = Blessed.screen({
smartCSR: true,
useBCE: true
var ChatHistory = function (options) {
if (!(this instanceof Blessed.Node)) {
return new ChatHistory(options);
RodrigoEspinosa /
Created May 12, 2015
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.
RodrigoEspinosa /
Last active Feb 11, 2020
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 /
Last active Aug 29, 2015
Custom haystack update_index command that disable logging
import logging
from import update_index
class Command(update_index.Command):
help = 'Custom haystack update index command that disable logging'
def handle(self, *args, **option):
RodrigoEspinosa /
Created Aug 19, 2014
JSON File Oriented Model
import json
class Model(object):
__json_file = None
__dict_file = None
def __init__(self, *args, **kwargs):
for item in kwargs:
RodrigoEspinosa / definitions.js
Last active Aug 29, 2015
Get this: week, month and year range Date prototype
View definitions.js
Date.prototype.getThisWeek = function () {
var y = this.getFullYear(),
m = this.getMonth(),
f = this.getDate() - this.getDay(),
l = f + 6;
return [new Date(y, m, f), new Date(y, m, l)];
Date.prototype.getThisMonth = function () {
RodrigoEspinosa / jQuery.fileUpload.js
Created Jan 17, 2014
jQuery ajax file upload plugin using FormData JavaScript Object.
View jQuery.fileUpload.js
(function ($) {
$.fn.fileUpload = function (options) {
var opts = $.extend({}, $.fn.fileUpload.defaults, options);
this.on('change', function (event) {
function createFormData (self) {
You can’t perform that action at this time.