Skip to content

Latest commit

 

History

History
160 lines (118 loc) · 5.66 KB

README.md

File metadata and controls

160 lines (118 loc) · 5.66 KB
______         _            _____         _      _                           
| ___ \       | |          |  __ \       | |    | |    ____             __   
| |_/ / _   _ | |__    ___ | |  \/  ___  | |  __| |   / __ )____ ______/ /_  
|    / | | | ||  _ \  / _ \| | __  / _ \ | | / _  |  / __  / __ // ___/ __ \ 
| |\ \ | |_| || |_) ||  __/| |_\ \| (_) || || (_| | / /_/ / /_/ (__  ) / / / 
\_| \_| \____||____/  \___| \____/ \___/ |_| \____//_____/\____/____/_/ /_/  
(っ◕‿◕)っ is an awesome game!

A command-line quest where your goal is to invent Rube Goldberg machines in bash! Create the longest one-liners you can, the more pipes (|) the better. Master Rube ((◕‿◕) Hi there!) will help you during your quest.

Getting Started

First open your favorite prompt, and then:

bash
source <(curl -sL start.rubegoldbash.com)

# Use share to submit your score:
rubeshare
# Use exit to stop RubeGoldBash
exit

The game relies on bash and curl to work, as well as other bash builtins and standard UNIX tools.

Look, screenshot!

Screenshot

Built with

Online services

Command line

Related

Main concept

Games

Videos

Contributing

Examples of RubeGoldBash (SPOILERS!)

# Retrieve the weather for your location
curl -s ip.appspot.com | xargs -n 1 curl -s "freegeoip.net/csv/$1" | cut -d ',' -f '9 10' | sed 's/,/\&lon=/g' | xargs -n 1 echo "http://api.openweathermap.org/data/2.5/weather?mode=html&lat=$1" | sed 's/ //g' | xargs -n 1 curl -s $1 | tee weather.html
# Same request, with display to the prompt using lynx
curl -s ip.appspot.com | xargs -n 1 curl -s "freegeoip.net/csv/$1" | cut -d ',' -f '9 10' | sed 's/,/\&lon=/g' | xargs -n 1 echo "http://api.openweathermap.org/data/2.5/weather?mode=html&lat=$1" | sed 's/ //g' | xargs -n 1 curl -s $1 | lynx -stdin -dump

# Retrieve the answer to "When will it be done?" (scraping) and make a nice voice read it for you.
lynx --dump whenwillitbedone.trgdy.com | head -n 8 | tail -n 4 | tr "\\n" ' ' | cut -d '[' -f 1 | sed 's/   //g' | sed "s/'/ /g" | perl -pe 's/([^a-zA-Z0-9_.!~*()'\''-])/sprintf("%%%02X", ord($1))/ge' | xargs -n 1 echo "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=$1" | sed 's/ //g' | xargs -n 1 curl -s "$1" > whenwillitbedone.mp3
# File can be read with
afplay whenwillitbedone.mp3

# Count the number of folders in the current working directory.
ls -l | cut -c 1 | grep d | wc -l

# Find the longest name
cat /usr/share/dict/propernames | grep 'S' | awk '{print length($1), $1}' | sort -n | tail -n 1 | cut -d ' ' -f 2
# And spell it
cat /usr/share/dict/propernames | grep 'S' | awk '{print length($1), $1}' | sort -n | tail -n 1 | cut -d ' ' -f 2 | say

Related commands to play with

# DNS IP lookup
dig +short myip.opendns.com @resolver1.opendns.com

# WS IP lookup
curl ip.appspot.com
curl ifconfig.me/ip
curl ipinfo.io/ip

# WS location lookup
curl freegeoip.net/csv/116.193.147.34
curl ipinfo.io/geo

# Current weather (it wouldn't be Rube Goldberg-y if it was useful)
curl "http://api.openweathermap.org/data/2.5/weather?lat=-41.00&lon=174.00&mode=html"

# Sound
curl "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world" > test.mp3
afplay test.mp3

# Dict
curl dict://dict.org/d:test

# Scraping
curl whenwillitbedone.trgdy.com | grep '<p>'

## Cal
cal | sed "s/.*/ & /;s/ $(date +%d) / [] /"
cal | sed "s/.*/ & /;s/ $(date +%d) / $(printf '\e[0;31m[]\e[0m') /"

## Cool one-liners
perl -le '$l=80;$l2="!" x $l;substr+($l2^=$l2),$l/2,1,"\xFF";{local $_=$l2;y/\0\xFF/ ^/;print;($lf,$rt)=map{substr $l2 x 2,$_%$l,$l;}1,-1;$l2=$lf^$rt;select undef,undef,undef,.1;redo}'
echo -e "\e[32m"; while :; do for i in {1..16}; do r="$(($RANDOM % 2))"; if [[ $(($RANDOM % 5)) == 1 ]]; then if [[ $(($RANDOM % 4)) == 1 ]]; then v+="\e[1m $r   "; else v+="\e[2m $r   "; fi; else v+="     "; fi; done; echo -e "$v"; v=""; done
yes "$(seq 232 255;seq 254 -1 233)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .01; done

## Building blocks to use
last
cat /dev/urandom | hexdump -C | grep "ca fe"
cat /usr/share/dict/propernames
cat /usr/share/dict/connectives
whatis