Do you want to be a better programmer?
Yes, we are talking about practice, man!
I've decided to code at least 3 hours per day while publishing at least one commit to Github. At 22h if I dont achieve this goals I will receive email like these:
Do you want to try it yourself? Follow these instructions:
- Start using WakaTime, so you can track how much time you spend coding
- Clone this repo:
git clone https://github.com/vlazic/we-are-talking-about-practice
on your server - Create
.env
file:cp .env.example .env
and change sample data:
# your email
TO_EMAIL=kody.stehr19@ethereal.email
# notify if there is no commits in last COMMIT_HOURS_WARNING hours
# this should probably match hour at which cronjob is running this script
COMMIT_HOURS_WARNING=22
# notify if number of coding hours is bellow this value
CODING_HOURS_WARNING=3
# Your Github username
GITHUB_USER=vlazic
# Your WakaTime API key
WAKATIME_API=39a81265-5a52-4192-8112-e0b16b4819dc
# SMTP server info
SMTP_HOST=smtp.ethereal.email
SMTP_PORT=587
SMTP_USER=kody.stehr19@ethereal.email
SMTP_PASS=NAsSRCgwcWa24DBFRc
SMTP_FROM_MAIL=kody.stehr19@ethereal.email
- Install dependencies:
npm install
- Build it:
npm run build
- Create cron job:
0 22 * * * node PATH_TO_REPO/dist/index.js
Practice by creating your own similar script which suits you better. This one is bloated because I wanted to try out Node with Typescript :)