DEV Community

CircusBearOnATrike
CircusBearOnATrike

Posted on

3 2

Using Fortune For Studying

Example

I'm studying for Comptia Security+ (SY0-501) certification as part of a retooling that I'm doing. (Working fulltime while going back to school ain't no joke.) The retooling is taking the form of degree, ctf/proof of work, and certifications. To help squeeze in some additional efficiency I've set up my terminal to pop up a flashcard each login of terms to memorize. This is accomplished using fortune, lolcat, and cowsay in conjunction with a custom fortune file. For right now, I've just grabbed a dumb list of terms to memorize but as I build my study guides, I'll flesh this out.

https://github.com/Chad-Ballay/fortune_study_guide

Install Utilities

Install fortune, lolcat, and cowsay using Homebrew. Only fortune is needed but the asthetics of having Lolcat and Cowsay make it better.

$ brew install fortune
$ brew install lolcat
$ brew install cowsay

Get A Fortune File

You can get mine.
https://github.com/Chad-Ballay/fortune_study_guide/blob/master/study_guides/SY0_501.fortune

Or write your own.

http://bradthemad.org/tech/notes/fortune_makefile.php

Setup Your Fortune File

I install them locally to ~/.fortune since the intention is to have specific cert ones for focus. You could install this wherever you want, you just need to remember that for the .bash_profile step.

$ mkdir ~/.fortune
$ cp ./study_guides/SY0_501.fortune ~/.fortune/
$ strfile ~/.fortune/SY0_501.fortune

Test It

You should be able to get some random flashcard and ascii art when you run this.

$ fortune ~/.fortune/SY0_501.fortune | cowsay -f $(shuf -n 1 -e $(cowsay -l | tail -n +2)) | lolcat

Setup Profile

Now to modify your login to always have one.

$ cp ~/.bash_profile ~/.bash_profile.backup.$$
$ echo 'fortune ~/.fortune/SY0_501.fortune | cowsay -f $(shuf -n 1 -e $(cowsay -l | tail -n +2)) | lolcat' >> ~/.bash_profile

TODO

PR's are always welcome.

  • I need to review the data in my Fortune file since there are misspellings galore.
  • I need to expand it to include more concepts.
  • I need to create other Fortune files for GSEC, CySA, CCNA, etc...

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay