Lyrics to the song "99 Bottles of Beer" written in multiple languages. This repository illustrates differences between computer languages by demonstrating simple mechanics (variable assignment, looping, etc).
Each language resides within a directory based on its name. Within each you'll find a Dockerfile, useful for testing execution. We use Docker here to virtualize the build environment, installing nothing on the local machine that can corrupt operations.
The following should work to validate the lyrics dump with C.
cd C/
docker build -t c_99bottles .
docker run c_99bottles
The following should work to validate the Go lyrics dump.
cd Go/
docker build -t go_99bottles .
docker run go_99bottles
docker run go_99bottles test
The following should work to validate the Python lyrics dump.
cd Python/
docker build -t py_99bottles .
docker run py_99bottles
docker run py_99bottles test
cd Rust/
docker build -t rust_99bottles .
docker run rust_99bottles
docker run rust_99bottles test
Create a virtual service. The iRules directory contains two code examples, one that returns HTML, another that returns plain text.
tmsh create / ltm virtual vip.99bottles.10000 { \
destination x.x.x.x:10000 ip-protocol tcp \
mask 255.255.255.255 rules { irule.99bottles } \
profiles add { tcp {} http {} } }
Use cURL to view the song lyrics.
curl -x '' -s04 http://x.x.x.x:10000/