Last Updated: February 25, 2016
· projectcleverweb

Chuck Norris In Your Terminal

Well jokes about him at least.

Usage: (assuming the file is named "chuck-norris")

chuck-norris 5


* When Chuck Norris plays Monopoly, it affects the actual world economy.

* Chuck Norris doesn't stub his toes. He accidentally destroys chairs,
bedframes, and sidewalks.

* What many people dont know is Chuck Norris is the founder of planned
parenthood. Not even unborn children can escape his wrath.

* Wilt Chamberlain claims to have slept with more than 20,000 women in his
lifetime. Chuck Norris calls this "a slow Tuesday."

* With the rising cost of gasoline, Chuck Norris is beginning to worry
about his drinking habit.

Source: (Windows with Xampp and Git Shell or Cygwin installed)

#!C:\xampp\php\php.exe -q

$amount = 1;
if (isset($argv[1])) {
    $amount = (int) $argv[1];
if (!$amount) {
    $amount = 1;

$ch = curl_init();
curl_setopt_array($ch, array(
    CURLOPT_URL => ''.((string) $amount)
$json = curl_exec($ch);

$data = json_decode($json);
foreach ($data->value as $joke) {
    $joke_msg = wordwrap("\n    * ".html_entity_decode($joke->joke), 75, "\n    ", TRUE)."\n";
    echo $joke_msg;