Once You Know, You Newegg
Results 1 to 4 of 4

Thread: A linux/unix script for Christmas (safe)

  1. #1
    AMDave's Avatar
    AMDave is offline Seeker of the exit clause Moderator
    Site Admin
    Join Date
    Jun 2004
    Location
    Deep in a while loop
    Posts
    8,905

    A linux/unix script for Christmas (safe)

    Thanks to Daniel on G+

    install gawk if not already installed
    open console / terminal in full screen
    paste the following code
    Code:
    clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS)) $(printf "\u2743\n");sleep 0.1;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH%s \033[0;0H",a[x],x,$4;}}'
    hit enter
    ctrl-C to stop


    Merry Christmas
    . . . . . ___
    . . . . . . .\___/\______
    . . . . . . . \__AMD___\\__
    ---------------------------------------------

  2. #2
    AMDave's Avatar
    AMDave is offline Seeker of the exit clause Moderator
    Site Admin
    Join Date
    Jun 2004
    Location
    Deep in a while loop
    Posts
    8,905
    It appears the original credit goes to climagic in 2011
    http://climagic.org/coolstuff/let-it-snow.html
    still works
    now has shorter versions using some nifty hacks.
    . . . . . ___
    . . . . . . .\___/\______
    . . . . . . . \__AMD___\\__
    ---------------------------------------------

  3. #3
    AMDave's Avatar
    AMDave is offline Seeker of the exit clause Moderator
    Site Admin
    Join Date
    Jun 2004
    Location
    Deep in a while loop
    Posts
    8,905
    $ sudo apt install cowsay

    the cowfiles should be here (ymmv)
    $ ls /usr/share/cowsay/cows
    there is an open bug for xmas-tree file missing, but have a look at the simple 'cow' file format and you can easily get the kids to make their own cow files


    Code:
    $ cowsay -f daemon Merry Christmas
     _________________
    < Merry Christmas >
     -----------------
       \         ,        ,
        \       /(        )`
         \      \ \___   / |
                /- _  `-/  '
               (/\/ \ \   /\
               / /   | `    \
               O O   ) /    |
               `-^--'`<     '
              (_.)  _  )   /
               `.___/`    /
                 `-----' /
    <----.     __ / __   \
    <----|====O)))==) \) /====
    <----'    `--' `.__,' \
                 |        |
                  \       /
            ______( (_  / \______
          ,'  ,-----'   |        \
          `--{__________)        \/
    
    $ cowsay -f dragon Merry Christmas
     _________________
    < Merry Christmas >
     -----------------
          \                    / \  //\
           \    |\___/|      /   \//  \\
                /0  0  \__  /    //  | \ \    
               /     /  \/_/    //   |  \  \  
               @_^_@'/   \/_   //    |   \   \ 
               //_^_/     \/_ //     |    \    \
            ( //) |        \///      |     \     \
          ( / /) _|_ /   )  //       |      \     _\
        ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
      (( / / )) ,-{        _      `-.|.-~-.           .~         `.
     (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
     (( /// ))      `.   {            }                   /      \  \
      (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
                 ///.----..>        \             _ -~             `.  ^-`  ^-_
                   ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                      /.-~
    . . . . . ___
    . . . . . . .\___/\______
    . . . . . . . \__AMD___\\__
    ---------------------------------------------

  4. #4
    AMDave's Avatar
    AMDave is offline Seeker of the exit clause Moderator
    Site Admin
    Join Date
    Jun 2004
    Location
    Deep in a while loop
    Posts
    8,905
    Wow. It still works!

    $ sudo apt install caca-utils

    $ cacafire

    maximize the window and feel the chilblains ebbing away
    . . . . . ___
    . . . . . . .\___/\______
    . . . . . . . \__AMD___\\__
    ---------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •