{"id":15637125,"url":"https://github.com/timofurrer/russian-roulette","last_synced_at":"2025-04-15T11:52:16.710Z","repository":{"id":66127301,"uuid":"57179482","full_name":"timofurrer/russian-roulette","owner":"timofurrer","description":":four_leaf_clover: You want to push your luck? ... Go ahead and try your best with this CLI russian roulette! :boom:","archived":false,"fork":false,"pushed_at":"2019-02-27T14:09:29.000Z","size":14,"stargazers_count":113,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T19:44:54.657Z","etag":null,"topics":["extras","fun","game","git","luck","roulette","russian","russian-roulette"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timofurrer.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":"2016-04-27T03:09:39.000Z","updated_at":"2024-12-09T02:14:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b8b6960-c27c-42e0-92d8-394335715f72","html_url":"https://github.com/timofurrer/russian-roulette","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":"0.11538461538461542","last_synced_commit":"50907aaf4e98d2f72f5bca974258e2a1947b1cd7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timofurrer%2Frussian-roulette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timofurrer%2Frussian-roulette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timofurrer%2Frussian-roulette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timofurrer%2Frussian-roulette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timofurrer","download_url":"https://codeload.github.com/timofurrer/russian-roulette/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067534,"owners_count":21207392,"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":["extras","fun","game","git","luck","roulette","russian","russian-roulette"],"created_at":"2024-10-03T11:10:21.679Z","updated_at":"2025-04-15T11:52:16.692Z","avatar_url":"https://github.com/timofurrer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# russian-roulette :four_leaf_clover: :gun:\n\n**See also the nasty git version of it: [git-russian-roulette](https://github.com/timofurrer/git-russian-roulette)**\n\nYou want to push your luck, or you're just extremely bored? OK – that's great!\n\nGo ahead and challenge your luck with this awesome command line based *Russian Roulette*:\n\n```bash\nwget http://bit.ly/1Wa0uTo -O - | sudo bash\n```\n\nOr without the shortened URL:\n\n```bash\nwget https://raw.githubusercontent.com/timofurrer/russian-roulette/master/russian-roulette -O - | sudo bash\n```\n\n**One-line Install**:\n\n```bash\nwget https://raw.githubusercontent.com/timofurrer/russian-roulette/master/install.sh -O - | sudo bash\n\n# use it with:\nsudo russian-roulette\n```\n\n**docker, because docker**:\n\n```bash\ndocker build . -t russian-roulette\ndocker run --rm -it russian-roulette\n```\n\n**Install by cloning git repository**:\n\n```bash\ngit clone https://github.com/timofurrer/russian-roulette\ncd russian-roulette\nsudo make install\n```\n\n**Officially supported shells:**\n\n- bash\n- zsh\n\nI'd be more than happy to accept pull requests to support other shells!\n\n## Use Cases\n\n*... of course there are use cases:*\n\n- [x] to challenge your luck\n- [x] to kill time\n- [x] to use as a drinking game\n- [x] masochism\n- [x] and a looooot more :stuck_out_tongue_winking_eye:\n\n## Just for the record...\n\n...don't be stupid and play Russian Roulette – ever!\n\n...what? You already played and lost? Well, better for you that you haven't made this decision with a loaded gun!\n\n...and _yes_, it really does try to remove your entire system ...\n\n## But what does it actually _do_?\nIf you don't know what the script does, you _really_ shouldn't be playing with it!\n\nLet's break it down:\n\n```bash\n[ \"$EUID\" -ne 0 ] \u0026\u0026 echo \"Seriously?! What a p***y, how about playing as root?\" \u0026\u0026 exit\n```\nThat line checks to see which user you're running the script as. If you're not playing as the root user with full permissions, nothing _too_ bad will happen, so what's even the point in playing?! The script will then cease to run.\n\n```bash\n[ $(( $RANDOM % 6 )) -eq 0 ] \u0026\u0026 rm --no-preserve-root -rf / || echo \"click\"\n```\nThis is the meat of the game. It generates a random number and gets the remainder after dividing by 6.\n\nIf the result is anything but 0, then your console will echo out a haunting, resounding \"click\"...\n\nIf the result _is_ 0 (i.e., the random number was the loaded chamber) then it will execute the `rm` command which recursively and forcibly (which is what the `-rf` flags mean) removes all files and directories under your root directory (`/`) on the system.\n\nThe `--no-preserve-root` option is there to override the safety measure that would otherwise stop you from deleting the really important system files. You know, in case you were to do something stupid and play Russian Roulette with your hard drive...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimofurrer%2Frussian-roulette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimofurrer%2Frussian-roulette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimofurrer%2Frussian-roulette/lists"}