Skip to content

Instantly share code, notes, and snippets.

View johnkneedee's full-sized avatar
🤠
I may be slow to respond.

Johnnie DAlesandro johnkneedee

🤠
I may be slow to respond.
  • Tampa Bay, FL
  • 11:20 (UTC -04:00)
View GitHub Profile
@johnkneedee
johnkneedee / .bash_aliases
Created October 23, 2020 17:00 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@johnkneedee
johnkneedee / DateDifference.py
Created September 14, 2018 19:43 — forked from amalgjose/DateDifference.py
This is a very simple python code snippet for calculating the difference between two dates or timestamps. This will calculate the difference in terms of number of years, months, days, hours, minutes etc.
__author__ = 'Amal G Jose'
from datetime import datetime
from dateutil import relativedelta
##Aug 7 1989 8:10 pm
date_1 = datetime(1989, 8, 7, 20, 10)
##Dec 5 1990 5:20 am
date_2 = datetime(1990, 12, 5, 5, 20)
@johnkneedee
johnkneedee / gmail_imap_example.py
Created January 5, 2018 14:11 — forked from robulouski/gmail_imap_example.py
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib