Skip to content

Instantly share code, notes, and snippets.

View joserc87's full-sized avatar

José Ramón Cano joserc87

  • RavenPack International S.L.
  • Marbella, Spain
View GitHub Profile
@joserc87
joserc87 / add_date.py
Created August 25, 2017 23:12
Add date
# Code example to manipulate dates (add days to dates) by parsing the string.
# This is only useful when you cannot import datetime.
def is_leap_year(year):
if (year % 4 == 0 and year % 100 != 0) \
or (year % 400 is 0):
return True
else:
return False
@joserc87
joserc87 / Vagrantfile
Created May 30, 2017 11:45
MEAN stack vagrant based on Ubuntu 16.04
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# box to build virtual evironment to build off of.