Skip to content

Instantly share code, notes, and snippets.

@roosto
Created July 26, 2018 13:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save roosto/df7b6c64ec090a4527d4336ccf9f2e3a to your computer and use it in GitHub Desktop.
Save roosto/df7b6c64ec090a4527d4336ccf9f2e3a to your computer and use it in GitHub Desktop.
Notes from my Creative Coding NYC ASCII Art ⚡ Talk on July 25, 2018

Creative Coding NYC ASCII Art ⚡ Talk

Here are links and follow-up notes from the ASCII Art Tips & Trick talk by Dustin Goldman, originally presented at the Creative Coding X meetup.

Dustin hopes you enjoyed the talk. If you have any questions, feel free to contact him on twitter, where he is @roosto

FIGlet

per the FIGlet website:

FIGlet is a program for making large letters out of ordinary text

| (_) | _____  | |_| |__ (_)___ 
| | | |/ / _ \ | __| '_ \| / __|
| | |   <  __/ | |_| | | | \__ \
|_|_|_|\_\___|  \__|_| |_|_|___/
                                

                          .   oooo         o8o           
                        .o8   `888         `"'           
 .ooooo.  oooo d8b    .o888oo  888 .oo.   oooo   .oooo.o 
d88' `88b `888""8P      888    888P"Y88b  `888  d88(  "8 
888   888  888          888    888   888   888  `"Y88b.  
888   888  888          888 .  888   888   888  o.  )88b 
`Y8bod8P' d888b         "888" o888o o888o o888o 8""888P' 
                                                         
                                                             
                             _/      _/        _/            
    _/_/    _/  _/_/      _/_/_/_/  _/_/_/          _/_/_/   
 _/    _/  _/_/            _/      _/    _/  _/  _/_/        
_/    _/  _/              _/      _/    _/  _/      _/_/     
 _/_/    _/                _/_/  _/    _/  _/  _/_/_/        
                                                             
                                                             
or this:
     #           #              #             #
##########      #######    ##########    ##########
    #    #     #     #         #    #         #
    #    #    # #   #          #    #         #
   #     #       ###          #     #        #
  #   # #       ##           #   # #        #
 #     #      ##            #     #       ##

               _     _   _                                     
           ___(_) __| |_| |   __ _ _____   _____    __ _  ___  
          |__ \ |/ _` |__ |  / _` / _ \ \ / / _ \  |__` |/ _ \ 
 _ _ _ _  / __/ | | | |_| | | | | \__  \ V /\__  |    | | (_) |
(_|_|_|_) \___|_|_| |_|__/  |_| |_|___/ \_/ |___/     |_|\___/ 

FIGlet can be obtained through homebrew and many other fine package distributors

cowsay

cowsay makes silly cartoon captions like the below

 ____________ 
< I am a cow! >
 ------------ 
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

cowsay can be obtained through homebrew and many other fine package distributors

N.B. If you use ansible often, you may not want to install cowsay. See Cowsay and Ansible for how cowsay interacts with ansible. And if you want to see how people really feel about this, grab your popcorn and head over to the Cowsay should not be enabled by default issue on ansible’s github.

fortune

fortune says random things; some version of it can be found via most fine package distributors

A “fun” command for Slack

figlet -f banner3 'ohai' | sed -e 's/^/ /g' -e 's/#/:partyparrot:/g' -e 's/ /:boom:/g' | pbcopy

See also my inspiration for this: Dave Powell’s party.sh, which interactively does roughly the same.

Bonus: cowtip.bash

cowtip.bash on github

Augment installed fortunes with some nerdy unix/bash ProTips(tm), and pipe fortune output through cowsay or cowthink using a fun assortment of custom themed .cow files

This is a small bash thing that I made to ¿improve? your experience of running fortune | cowsay from your .bash_profile script.

Bonus II: how to configure a banner for sshd on macOS

I am assuming that you have already enabled remote ssh login to your Mac. If you don’t already have ssh login setup, and/or you are not using ssh login regularly, this is not for you. Allowing ssh login is definitely a a security risk, and if it’s something that if you needed or wanted, you’ll have already figured out how to get working on your own.

OK warnings aside, if you are already running sshd on your mac (the daemon that does ssh login), the below will setup a banner for you.

  1. Create your banner file at, say, ~/Pictures/banner.txt
  2. As root copy your banner to its logical directory:
    sudo cp -i ~/Pictures/banner.txt /etc/ssh/banner.txt
    (since you’re running it as root, make sure to use -i!)
  3. Make a back up of your sshd_config file, in case something goes wrong:
    sudo cp -i /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
    (again, please use -i!)
  4. Open your sshd_config file, as root (we will use nano because it’s a fairly easy to use terminal based editor):
    sudo nano /etc/ssh/sshd_config
  5. Find the commented line for Banner in the config, uncomment it, and change it to be:
    Banner /etc/ssh/banner.txt
  6. Save the file, exit the editor
  7. For a sanity check make sure you only changed the one line in the config file:
    diff /etc/ssh/sshd_config.bak /etc/ssh/sshd_config
  8. restart the ssh daemon to load your new config with the below two commands
  9. launchctl stop com.openssh.sshd
  10. launchctl start com.openssh.sshd
  11. login via ssh to enjoy the fruits of your labor!

cats.txt

The cats.txt file used in the presentation is from Christopher Johnson’s ASCII Art Collection, which is quite good, though rather lacking in eagles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment