Skip to content

Instantly share code, notes, and snippets.

View dreamsparkx's full-sized avatar
👑

Gaurav Bharti dreamsparkx

👑
  • PayPal
  • New Delhi
View GitHub Profile
@dreamsparkx
dreamsparkx / go-install-mac.txt
Last active March 8, 2021 17:05
Install Golang On Mac
Install Golang with Homebrew:
$ brew update
$ brew install golang
When installed, try to run go version to see the installed version of Go.
Setup the workspace:
Add Environment variables:
Go has a different approach of managing code, you'll need to create a single Workspace for all your Go projects. For more information consult : How to write Go Code
First, you'll need to tell Go the location of your workspace.
@dreamsparkx
dreamsparkx / .bash_profile
Last active September 9, 2017 04:35
Configure Terminal for simplicity
if [ -f ~/.bashrc ];
then
source ~/.bashrc
fi
@dreamsparkx
dreamsparkx / More-links.txt
Last active July 22, 2024 17:46
Install Apache, PHP, MySQL and phpMyAdmin on Mac OS X
@dreamsparkx
dreamsparkx / diffDates.py
Last active September 8, 2017 16:12
Difference between two dates
import datetime
mdate = "2017-10-19" #Write your date Here
rdate = datetime.datetime.now().strftime("%Y-%m-%d") #Current Date
mdate1 = datetime.datetime.strptime(mdate, "%Y-%m-%d").date()
rdate1 = datetime.datetime.strptime(rdate, "%Y-%m-%d").date()
delta = (mdate1 - rdate1).days #calculate difference between dates
print "%d days Left!!"%(delta)