book
  • README
  • cheatsheet
    • bash
      • builtin
      • syntactic sugar
      • cmd
      • havefun
    • text-processing
      • awk
      • sed
      • html
      • json
      • regex
      • unicode
    • osx
    • curl
    • tricky
    • widget
    • proxy
    • colors
    • math
    • media
    • ssl
      • keystore
      • verification
      • server
      • client
      • tricky
    • windows
      • powershell
      • choco
      • wsl
      • wt
      • shortcut
      • clsid
      • env
      • shell:folder
  • vim
    • nvim
    • install
    • color
    • plugins
      • usage
      • other plugins
      • deprecated
    • tricky
    • viml
    • windows
    • troubleshooting
  • devops
    • admin tools
    • ssh
    • git
      • config
      • alias
      • submodule
      • eol
      • example
      • gerrit
        • gerrit API
      • github
      • troubleshooting
      • tricky
      • statistics
    • pre-commit
    • release-tools
    • tmux
      • cheatsheet
    • ansible
    • vault
    • artifactory
      • api
      • cli
      • aql
      • nginx cert
    • klocwork
      • kwadmin
      • kwserver
      • api
      • q&a
    • elk
    • mongodb
    • android
    • mobile
  • jenkins
    • config
      • windows
    • appearance
    • troubleshooting
    • jenkinsfile
      • utility
      • parallel
      • build
      • envvar
      • properties
      • trigger
      • node
    • script
      • job
      • build
      • stage
      • agent
      • security & authorization
      • exception
      • monitor
      • tricky
    • api
      • blueocean
    • cli
    • plugins
      • kubernetes
      • docker
      • shared-libs
      • lockable-resource
      • ansicolor
      • badge
      • groovy-postbuild
      • simple-theme
      • customizable-header
      • artifactory
      • jira-steps
      • job-dsl
      • build-timeline
      • crumbIssuer
      • coverage
      • uno-choice
      • tricky
  • virtualization
    • kubernetes
      • init
        • kubespray
        • kubeadm
          • environment
          • crio v1.30.4
          • docker v1.15.3
          • HA
        • addons
        • etcd
      • kubectl
        • pod
        • deploy
        • replicasets
        • namespace
        • secrets
      • node
      • certificates
      • events
      • kubeconfig
      • kubelet
      • troubleshooting
      • cheatsheet
      • auth
      • api
      • tools
        • monitor
        • helm
        • network
        • minikube
    • docker
      • run & exec
      • voume
      • remove
      • show info
      • dockerfile
      • dockerd
      • tricky
      • troubleshooting
      • windows
    • crio
    • podman
  • ai
    • prompt
  • osx
    • apps
      • init
      • brew
    • defaults
    • system
    • network
    • script
    • tricky
  • linux
    • devenv
    • util
      • time & date
      • output formatting
      • params
      • tricky
    • nutshell
    • disk
    • network
    • troubleshooting
    • system
      • apt/yum/snap
      • authorization
      • apps
      • x11
    • ubuntu
      • systemctl
      • x
    • rpi
  • programming
    • groovy
    • python
      • config
      • basic
      • list
      • pip
      • q&a
    • others
    • archive
      • angular
      • maven
      • mysql
        • installation
        • logs
      • ruby
        • rubyInstallationQ&A
  • tools
    • fonts
    • html & css
    • Jira & Confluence
    • node & npm
      • gitbook
      • hexo
      • github.page
      • code themes
    • app
      • microsoft office
      • vscode
      • virtualbox
      • iterm2
      • browser
      • skype
      • teamviewer
      • others
  • quotes
  • english
Powered by GitBook
On this page

Was this helpful?

  1. cheatsheet
  2. bash

havefun

PreviouscmdNexttext-processing

Last updated 6 months ago

Was this helpful?

I'm very busy

$ cat /dev/urandom | hexdump -C | grep "ca fe"

# or: https://www.commandlinefu.com/commands/view/6771/pretend-to-be-busy-in-office-to-enjoy-a-cup-of-coffee
$ j=0; while true; do let j=$j+1; for i in $(seq 0 20 100); do echo $i;sleep 1; done | dialog --gauge "Install part $j : `sed $(perl -e "print int rand(99999)")"q;d" /usr/share/dict/words`" 6 40;done

# or: https://www.commandlinefu.com/commands/view/6673/pretend-to-be-busy-in-office-to-enjoy-a-cup-of-coffee
$ for i in `seq 0 100`; do timeout 6 dialog --gauge "Install..." 6 40 "$i"; done

# show quota
$ fortune | pv -qL 10
$ while ( true ) ; do if [ $(expr $RANDOM % 2 ) -eq 0 ] ; then echo -ne "\xE2\x95\xB1" ; else echo -ne "\xE2\x95\xB2" ; fi ; done

press any key to continue

$ read -sn 1 -p "Press any key to continue..." && echo "\n"
Press any key to continue...\n

fortune

  • $ fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1)
  • $ for i in {1..20}; do fortune -w ; sleep 3; clear; done

simulate type mechine (super cool!!)

[!NOTE|label:references:]

$ sudo apt-get intall pv
$ echo "Very very very very very long words" | pv -qL $[10+(-2 + RANDOM%5)]
$ echo "You can simulate on-screen typing just like in the movies" | pv -qL 10

# or
$ sudo apt-get install randtype
$ echo "Very very very very very long words" | randtype -m 4

# or
$ echo "hello world !" | while read x; do for(( i=0; i<${#x}; i++ )); do echo -n "${x:$i:1}"; sleep .06; done; done
  • $ echo -e "You are wa jerk\b\b\b\bwonderful person" | pv -qL $[10+(-2 + RANDOM%5)]
  • $ message="I have a nice easy typing pace"; for ((i=0; i<${#message}; i++)); do echo "after 100" | tclsh; printf "${message:$i:1}"; done; echo
  • $ cycle(){ while :;do((i++)); echo -n "${3:$(($i%${#3})):1}"; sleep .$(($RANDOM%$2+$1)); done; }
    
    # usage
    $ cycle 1 4 ' All work and no play makes Jack a dull boy.'
    $ cycle 1 3 $(openssl rand 100 | xxd -p)

set volume by command

$ pacmd set-sink-volume 0 0x10000
Welcome to PulseAudio! Use "help" for usage information.

cat and tac

$ cat a_b
1
2
3
$ tac a_b
3
2
1

ASCII chart

$ figlet Marslo
 __  __                _
|  \/  | __ _ _ __ ___| | ___
| |\/| |/ _` | '__/ __| |/ _ \
| |  | | (_| | |  \__ \ | (_) |
|_|  |_|\__,_|_|  |___/_|\___/

$ toilet marslo
                             ""#
 mmmmm   mmm    m mm   mmm     #     mmm
 # # #  "   #   #"  " #   "    #    #" "#
 # # #  m"""#   #      """m    #    #   #
 # # #  "mm"#   #     "mmm"    "mm  "#m#"

# with fonts
$ date +"%I:%M %P" | figlet -f /usr/local/share/figlet/future.tlf
┏━┓┏━┓ ┏━┓┏━┓   ┏━┓┏┳┓
┃┃┃╺━┫╹╺━┫  ┃   ┣━┫┃┃┃
┗━┛┗━┛╹┗━┛  ╹   ╹ ╹╹ ╹

$ date +"%I:%M %P" | toilet -f future
┏━┓┏━┓ ┏━┓┏━┓   ┏━┓┏┳┓
┃┃┃╺━┫╹╺━┫  ┃   ┣━┫┃┃┃
┗━┛┗━┛╹┗━┛  ╹   ╹ ╹╹ ╹

# with colors
$ toilet --gay -f term
# or
$ toilet --metal -f term

# have fun
$ fortune | toilet -w $(($(tput cols)-5)) -f pagga
░█▀▀░█░█░█▀▀░█▀▀░█▀▀░█▀▀░▀█▀░░░█░█░█▀█░█░█░░░▀▀█░█░█░█▀▀░▀█▀░░░█▀▀░▀█▀░▀█▀░░░▀█▀░█░█░█▀▀░█▀▄░█▀▀░░░█▀█░█▀█░█▀▄░░░█░█░█▀█
░▀▀█░█░█░█░█░█░█░█▀▀░▀▀█░░█░░░░░█░░█░█░█░█░░░░░█░█░█░▀▀█░░█░░░░▀▀█░░█░░░█░░░░░█░░█▀█░█▀▀░█▀▄░█▀▀░░░█▀█░█░█░█░█░░░█▄█░█▀█
░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░░▀░░░░░▀░░▀▀▀░▀▀▀░░░▀▀░░▀▀▀░▀▀▀░░▀░░░░▀▀▀░▀▀▀░░▀░░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░░░▀░▀░▀░▀░▀▀░░░░▀░▀░▀░▀
░▀█▀░▀█▀░░░▀█▀░▀█▀░█░░░█░░░░░█░░░▀█▀░█▀▀░█▀▀░░░█▀▀░█▀▀░▀█▀░█▀▀░░░█▀▀░█▀█░█▀▀░▀█▀░█▀▀░█▀▄░░░
░░█░░░█░░░░░█░░░█░░█░░░█░░░░░█░░░░█░░█▀▀░█▀▀░░░█░█░█▀▀░░█░░▀▀█░░░█▀▀░█▀█░▀▀█░░█░░█▀▀░█▀▄░░░
░▀▀▀░░▀░░░░░▀░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░▀░░░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀▀▀░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░

hate someone

$ :(){ :|: &  };:

star war

$ telnet towel.blinkenlights.nl

labyrinth pattern
a random "cow" say a random thing
loop show
Simulate typing
Simulate typing
Simulate typing but with mistakes
Mac osx friendly version of this terminal typing command at 200ms per key
continuously print string as if being entered from the keyboard
I'm very busy
labyrinth pattern
press any key to continue
fortune
simulate type mechine (super cool!!)
set volume by command
cat and tac
ASCII chart
hate someone
star war