Skip to content

Instantly share code, notes, and snippets.

View aris-b's full-sized avatar
🙈

Aris aris-b

🙈
  • PeoplePerHour.com
  • Athens, Greece
View GitHub Profile
@aris-b
aris-b / keybase.md
Created June 21, 2019 12:29
keybase.md

Keybase proof

I hereby claim:

  • I am aris-b on github.
  • I am arisb88 (https://keybase.io/arisb88) on keybase.
  • I have a public key ASAulqt4wtefAF29cqqImChmOIWtn5oKezMaI1t1SBRQngo

To claim this, I am signing this object:

@aris-b
aris-b / year-calc.py
Last active January 29, 2017 22:44
python year calc
#####################################################################
# Calculate days between two given dates #
# Usage: daysBetweenDates(day1, month1, year1, day2, month2, year2) #
# Example: daysBetweenDates(1, 1, 2016, 29, 3, 2020) #
#####################################################################
daysOfMonths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def isLeapYear(year):
if (year % 4 != 0):
/**
* Parses a block of text and replaces strings that look like a hyrerlink
* with appropriate <a> tags
*
* Strings parsed are those that start with "http://" or "www."
*
* @param type $txt block of text to be parsed
* @param type $target target attribute for the <a> tags
*