{"id":20332372,"url":"https://github.com/zeroby0/pranks","last_synced_at":"2025-03-04T12:41:48.953Z","repository":{"id":175198231,"uuid":"151865770","full_name":"zeroby0/pranks","owner":"zeroby0","description":"Unix pranks to slowly drive your friends mad","archived":false,"fork":false,"pushed_at":"2019-02-06T14:39:36.000Z","size":3891,"stargazers_count":23,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T13:51:19.915Z","etag":null,"topics":["hacktoberfest","pranks"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeroby0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-06T17:42:26.000Z","updated_at":"2025-02-05T02:31:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb5b7732-ebf6-4919-9054-5479cc02da40","html_url":"https://github.com/zeroby0/pranks","commit_stats":null,"previous_names":["zeroby0/pranks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Fpranks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Fpranks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Fpranks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Fpranks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroby0","download_url":"https://codeload.github.com/zeroby0/pranks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241851558,"owners_count":20030964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","pranks"],"created_at":"2024-11-14T20:26:14.637Z","updated_at":"2025-03-04T12:41:48.918Z","avatar_url":"https://github.com/zeroby0.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pranks\nHere is a list of all my favourite \\*nix \u0026 Windows pranks.\n\nTable of Contents\n- [1. Slow down the terminal](#1-slow-down-the-terminal)\n- [2. Create a `~` folder](#2-create-a--folder)\n- [3. Change ssh to shh](#3-change-ssh-to-shh)\n- [4. File names that end with spaces](#4-file-names-that-end-with-spaces)\n- [5. Ssshhh! - macOS only](#5-ssshhh---macos-only)\n- [6. Upside down Windows - Windows Only](#6-upside-down-windows)\n- [7. Change Editors!](#7-change-editors)\n- [8. Install sl](#8-install-sl)\n- [9. Make `date` return random dates](#9-make-date-return-random-dates)\n- [10. Dancing parrot on your terminal](#10-dancing-parrot-on-your-terminal)\n- [11. Make `cat` print a cat randomly](#11-make-cat-print-a-cat-randomly)\n\n## 1. Slow down the terminal\n\n![](./img/whitepng/1.png) \n\u003c!-- ![](./img/3.png) --\u003e\n\n```\necho \"echo 'sleep .1' \u003e\u003e ~/.bashrc\" \u003e\u003e ~/.bashrc\n```\n\nSo 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.\n\n## 2. Create a `~` folder\n**Note**: Potentially destructive. Use caution.\n\u003c!-- ![mkdir '~' \u0026\u0026 echo \"kghkjhlkjh\" \u003e ./'~'/1](./img/2.1.png) --\u003e\n![](./img/whitepng/2.1.png) \n\n```\nmkdir '~'\necho \"kghkjhlkjh\" \u003e ./'~'/1\n```\nWhile `~` 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.\n\nNow, invariably, the victim types `rm -rf ~` to delete the folder. :smiling_imp:\n\nIf you want to be sure the user notices it, add this line to `~/.bashrc`.  \n\n\u003c!-- ![](./img/2.2.png) --\u003e\n![](./img/whitepng/2.2.png) \n\n```\nalias cd=\"mkdir -p '~' \u0026\u0026 echo \"kghkjhlkjh\" \u003e ./'~'/1 \u0026\u0026 cd\"\n```\nNow every directory the user `cd`s into will have a `~` folder.\n\n## 3. Change ssh to shh\n\u003c!-- ![mv ~/.ssh ~/.shh](./img/1.png) --\u003e\n![](./img/whitepng/3.png) \n```\nmv ~/.ssh ~/.shh\n```\nFrom this: https://twitter.com/nixcraft/status/1045760653510815744\n\n\n## 4. File names that end with spaces\n\n![](./img/whitepng/4.png) \n\u003c!-- ![](./img/4.png) --\u003e\n\n```\nmv ~/.ssh ~/'.ssh '\n```\n```\nmkdir ~/Desktop/'hello '\n```\nAnd so on.\n\nFile names with trailing spaces are perfectly legal. Watch them struggle deleting it :laughing:\n\n![file-with-spaces.png](./img/file-with-spaces.png)\n\n## 5. Ssshhh! - macOS only\n\nIn `settings \u003e accessibility \u003e Speech \u003e System voice \u003e customise`, download voice `whisper`.  \n\nNow, add this to `~/.bashprofile`\n\n![](./img/whitepng/5.png)  \n\u003c!-- ![](./img/5.png)   --\u003e\n\n```\nalias ssh=\"osascript -e 'set volume 10' \u0026\u0026 say -v whisper shh \u0026\u0026 ssh\"\n```\n\n## 6. Upside down Windows\n\nEvery one knows that `ctrl + shift + down-arrow` inverts the desktop. Instead, \n\n* Take a screenshot of the normal Desktop, invert it horizontally and vertically in paint. \n* Then disable icons and auto hide the taskbar.\n* Set the previous inverted image as Wallpaper.\n* optional: Invert mouse and arrow keys from settings\n* Now invert the Desktop!\n\n## 7. Change Editors!\n\nModify the `.bashrc` to include this:  \n\n![](./img/whitepng/7.png)  \n\n```\nalias nano=\"/usr/bin/vi\"\nalias vi=\"/usr/bin/nano\"\nalias vim=\"/usr/bin/emacs\"\nalias emacs=\"/usr/bin/vim\"\n```\n\n## 8. Install sl\n\nInstall sl and leave it be. Everyone is bound to type `sl` instead of `ls` at some point of time.\n\nhttps://www.youtube.com/watch?v=9GyMZKWjcYU\n\n## 9. Make `date` return random dates\n\nThis might need some tweaking in some systems, especially BSD versions of `date` command.  Add these to `.bashrc`.\n\n![](./img/whitepng/9.1.png)  \n\n``` sh\n alias date='date -d \"now + $RANDOM days\"'\n```\n\nSimilarly, for the `cal` command,\n\n![](./img/whitepng/9.2.png)  \n\n``` sh\nfunction cal() {\n    if [ $# -eq 0 ]; then # If no arguments\n        /usr/bin/cal -m $(date +%b) $(( ((RANDOM\u003c\u003c15)|RANDOM) % 45 + 2000 ));\n    else\n        /usr/bin/cal $(( ((RANDOM\u003c\u003c15)|RANDOM) % 45 + 2000 ));\n    fi;\n}\n```\n\n![cal](./img/cal.png)\n\n## 10. Dancing parrot on your terminal\n\n![parrot](./img/whitepng/10.png)\n\n## 11. Make `cat` print a cat randomly\n\n``` sh\nfunction cat() {\n\trdm=$(( ((RANDOM\u003c\u003c15)|RANDOM) % 5000 ));\n\tif test $rdm -lt 400\n\tthen\n\t\tbase64 -D \u003c\u003c\u003c \"ICAgICAgICAgICAgICAgICAgVC4iLS5fLi4tLS0uLl8sLSIvfAogICAgICAgICAgICAgICAgICBsfCItLiAgXy52Ll8gICAoIiB8CiAgICAgICAgICAgICAgICAgIFtsIC8uJ18gXDsgX34iLS5gLXQKICAgICAgICAgICAgICAgICAgWSAiIF8ob30gX3tvKS5fIF4ufAogICAgICAgICAgICAgICAgICBqICBUICAsLTx2Pi0uICBUICBdCiAgICAgICAgICAgICAgICAgIFwgIGwgKCAvLV4tXCApICEgICEKICAgICAgICAgICAgICAgICAgIFwuIFwuICAifiIgIC4vICAvYy0uLixfXwogICAgICAgICAgICAgICAgICAgICBeci0gLi5fIC4tIC4tIiAgYC0gLiAgfiItLS4KICAgICAgICAgICAgICAgICAgICAgID4gXC4gICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgXSAgIF4uICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgMyAgLiAgIj4gICAgICAgICAgICAuICAgICAgIFkKICAgICAgICAgLC5fXy4tLS5fICAgX2ogICBcIH4gICAuICAgICAgICAgOyAgICAgICB8CiAgICAgICAgKCAgICB+Ii0uX34iXi5fXCAgIF4uICAgIF4uXyAgICAgIEkgICAgIC4gbAogICAgICAgICAiLS5fIF9fXyB+Ii0sXzcgICAgLlotLl8gICA3IiAgIFkgICAgICA7ICBcICAgICAgICBfCiAgICAgICAgICAgIC8iICAgIn4tKHIgciAgXy9fLS0uX34tLyAgICAvICAgICAgLywuLS1eLS5fICAgLyBZCiAgICAgICAgICAgICItLl8gICAgJyJ+fn4+LS5ffl0+LS1eLS0tLi9fX19fLC5efiAgICAgICAgXi5eICAhCiAgICAgICAgICAgICAgICB+LS0uXyAgICAnICAgWS0tLS4gICAgICAgICAgICAgICAgICAgICAgICBcLi8KICAgICAgICAgICAgICAgICAgICAgfn4tLS5fICBsXyAgICkgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLl9+fn4tLS0uXyxfX19fLi4tLS0gICAgICAgICAgIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLS0tIn4gICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA==\"\n\telse\n\t\t/bin/cat $1\n\tfi;\n}\n```\n\n![](./img/showcat.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroby0%2Fpranks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroby0%2Fpranks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroby0%2Fpranks/lists"}