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 / model.py
Created August 19, 2014 03:16
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
RodrigoEspinosa / definitions.js
Last active August 29, 2015 14:01
Get this: week, month and year range Date prototype
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 () {