Giter Site home page Giter Site logo

pranks's Introduction

Pranks

Here is a list of all my favourite *nix & Windows pranks.

Table of Contents

1. Slow down the terminal

echo "echo 'sleep .1' >> ~/.bashrc" >> ~/.bashrc

So a sleep .1 is added to ~/.bashrc everytime the user starts a new terminal. So the terminal startup time increases with every use, slowly, but surely.

2. Create a ~ folder

Note: Potentially destructive. Use caution.

mkdir '~'
echo "kghkjhlkjh" > ./'~'/1

While ~ is an alias for $HOME folder, file/folder names with ~ are perfectly legal. Put some random stuff in it so that user has to use rm -rf to delete the folder.

Now, invariably, the victim types rm -rf ~ to delete the folder. 😈

If you want to be sure the user notices it, add this line to ~/.bashrc.

alias cd="mkdir -p '~' && echo "kghkjhlkjh" > ./'~'/1 && cd"

Now every directory the user cds into will have a ~ folder.

3. Change ssh to shh

mv ~/.ssh ~/.shh

From this: https://twitter.com/nixcraft/status/1045760653510815744

4. File names that end with spaces

mv ~/.ssh ~/'.ssh '
mkdir ~/Desktop/'hello '

And so on.

File names with trailing spaces are perfectly legal. Watch them struggle deleting it 😆

file-with-spaces.png

5. Ssshhh! - macOS only

In settings > accessibility > Speech > System voice > customise, download voice whisper.

Now, add this to ~/.bashprofile

alias ssh="osascript -e 'set volume 10' && say -v whisper shh && ssh"

6. Upside down Windows

Every one knows that ctrl + shift + down-arrow inverts the desktop. Instead,

  • Take a screenshot of the normal Desktop, invert it horizontally and vertically in paint.
  • Then disable icons and auto hide the taskbar.
  • Set the previous inverted image as Wallpaper.
  • optional: Invert mouse and arrow keys from settings
  • Now invert the Desktop!

7. Change Editors!

Modify the .bashrc to include this:

alias nano="/usr/bin/vi"
alias vi="/usr/bin/nano"
alias vim="/usr/bin/emacs"
alias emacs="/usr/bin/vim"

8. Install sl

Install sl and leave it be. Everyone is bound to type sl instead of ls at some point of time.

https://www.youtube.com/watch?v=9GyMZKWjcYU

9. Make date return random dates

This might need some tweaking in some systems, especially BSD versions of date command. Add these to .bashrc.

 alias date='date -d "now + $RANDOM days"'

Similarly, for the cal command,

function cal() {
    if [ $# -eq 0 ]; then # If no arguments
        /usr/bin/cal -m $(date +%b) $(( ((RANDOM<<15)|RANDOM) % 45 + 2000 ));
    else
        /usr/bin/cal $(( ((RANDOM<<15)|RANDOM) % 45 + 2000 ));
    fi;
}

cal

10. Dancing parrot on your terminal

parrot

11. Make cat print a cat randomly

function cat() {
	rdm=$(( ((RANDOM<<15)|RANDOM) % 5000 ));
	if test $rdm -lt 400
	then
		base64 -D <<< "ICAgICAgICAgICAgICAgICAgVC4iLS5fLi4tLS0uLl8sLSIvfAogICAgICAgICAgICAgICAgICBsfCItLiAgXy52Ll8gICAoIiB8CiAgICAgICAgICAgICAgICAgIFtsIC8uJ18gXDsgX34iLS5gLXQKICAgICAgICAgICAgICAgICAgWSAiIF8ob30gX3tvKS5fIF4ufAogICAgICAgICAgICAgICAgICBqICBUICAsLTx2Pi0uICBUICBdCiAgICAgICAgICAgICAgICAgIFwgIGwgKCAvLV4tXCApICEgICEKICAgICAgICAgICAgICAgICAgIFwuIFwuICAifiIgIC4vICAvYy0uLixfXwogICAgICAgICAgICAgICAgICAgICBeci0gLi5fIC4tIC4tIiAgYC0gLiAgfiItLS4KICAgICAgICAgICAgICAgICAgICAgID4gXC4gICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgXSAgIF4uICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgMyAgLiAgIj4gICAgICAgICAgICAuICAgICAgIFkKICAgICAgICAgLC5fXy4tLS5fICAgX2ogICBcIH4gICAuICAgICAgICAgOyAgICAgICB8CiAgICAgICAgKCAgICB+Ii0uX34iXi5fXCAgIF4uICAgIF4uXyAgICAgIEkgICAgIC4gbAogICAgICAgICAiLS5fIF9fXyB+Ii0sXzcgICAgLlotLl8gICA3IiAgIFkgICAgICA7ICBcICAgICAgICBfCiAgICAgICAgICAgIC8iICAgIn4tKHIgciAgXy9fLS0uX34tLyAgICAvICAgICAgLywuLS1eLS5fICAgLyBZCiAgICAgICAgICAgICItLl8gICAgJyJ+fn4+LS5ffl0+LS1eLS0tLi9fX19fLC5efiAgICAgICAgXi5eICAhCiAgICAgICAgICAgICAgICB+LS0uXyAgICAnICAgWS0tLS4gICAgICAgICAgICAgICAgICAgICAgICBcLi8KICAgICAgICAgICAgICAgICAgICAgfn4tLS5fICBsXyAgICkgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLl9+fn4tLS0uXyxfX19fLi4tLS0gICAgICAgICAgIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLS0tIn4gICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA=="
	else
		/bin/cat $1
	fi;
}

pranks's People

Contributors

r-arvind avatar zeroby0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

r-arvind

pranks's Issues

How about this dilation?

function  () { sleep 0; }; function ȳ () { echo "$1" >> ~/slow.sh; }; ȳ "ȳ \"`node -p \"require('fs').readFileSync('$HOME/slow.sh').toString().split('\\\\n').slice(1).join('\\\\n').replace(/\\\\\\\\/g, '\\\\\\\\\\\\\\\').replace(/\\\"/g, '\\\\\\\\\\"')\"`\""

Requires Node however :-(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.