Finally kept track of in a public fashion. Add new recipes with pull requests! Or create an account and add it directly for me to push up.
PHP CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bower_components
fonts
.gitattributes
.gitignore
LICENSE
README.md
acorn_squash_soup.php
api.php
apple_crumble.php
apple_rings.php
apple_strudel.php
bbq_chicken.php
beef_stroganoff.php
bower.json
brownies.php
browser.inc
cheesecake.php
cheesy_pasta.php
chicken_and_dumplings.php
chicken_and_pasta_primavera.php
chicken_tomato_parmesan.php
chinese_pork_chops.php
chocolate_cake.php
chocolate_chip_cookies.php
chocolate_frosting.php
chocolate_mousse.php
crab_sauce.php
cream_of_mushroom_soup.php
feta_pasta.php
footer.inc
garlic_chive_chicken.php
general_tsos.php
generate_sitemap.php
gingerbread_cookies.php
golden_pork_chops.php
green_bean_casserole.php
ham.php
header.inc
index.php
italian_sausage_pasta.php
kaesespaetzle.php
kielbasa_in_beer.php
lasagna.php
main.css
mashed_potatoes.php
meatloaf.php
mushroom_risotto.php
pancakes.php
pizza_dough.php
pound_cake.php
print.css
pulled_pork.php
pumpkin_bread.php
salisbury_steak.php
scalloped_potatoes.php
soft_pretzels.php
sour_cream_kahlua_cake.php
spaetzle.php
spaghetti_and_meatballs.php
spinach_stuffed_chicken_breasts.php
sweet_and_sour_pork_or_chicken.php
template.php
teriyaki_tritip.php
thai_pepper_garlic.php
tikka_masala.php
toffee.php
tomato_basil_soup.php
waffles.php
wassail.php
whiskey_grilled_ribs.php

README.md

Recipes!

http://revealedsingularity.net/recipes/index.php

A fork for just KR can be found at http://www.quantum-immortal.net/rspradley/recipes/root.php

How to add a new recipe

This assumes you have an account. Otherwise, join GitHub and make me add you as a collaborator, or email your mod of template.php to me directly.

  1. Take the template file template.php, and copy its contents.

  2. Create a new file

  1. Paste the contents of the template in the editor, edit, and save! Just name the file name_of_my_recipe.php. Shoot me an email to update the site to get it up fast, otherwise I'll notice it in a bit and update.

How to include these recipes in your own site

Include this anywhere in your root loop:

function array_multimerge($a1,$a2)
{
  /*
   * Takes an array with duplicate keys and renames the keys.
   */
  $r = is_array($a1) ? $a1:array();
  if(is_array($a2))
    {
      foreach($a2 as $k=>$v)
        {
          $skip = false;
          if(array_key_exists($k,$r) && !is_numeric($k))
            {
              $i=2;
              $kt = $k."-".$i;
              while(key_exists($kt,$r))
                {
                  $i++;
                  $kt = $k."-".$i;
                }
              $k = $kt;
            }
          else if (key_exists($k,$r) && is_numeric($k))
            {
              $r[]=$v;
              $skip = true;
            }
          if(!$skip) $r[$k]="\n\t<li><a href='$v'>$k</a></li>";;
        }
    }
  return array_unique($r);
}

function includeTarget($url)
{
  try
    {
      $opts = array(
        'http'=>array(
          'method'=>'GET',
          'timeout'=>3.5
        )
      );
      $context = stream_context_create($opts);
      $json=@file_get_contents($url,false,$context);
      if($json === false) return $fill;
      $fill=json_decode($json,true);
      $list=array();
      foreach($fill as $key=>$value)
        {
          $list[strtolower($key)]=$value;
        }
    }
  catch (Exception $e)
    {
      return is_array($list) ? $list:array();
    }
  return is_array($list) ? $list:array();
}

Then, once you have the list of your own files (check out dirList() in index.php for how I do it), add the following line into you list generator:

  // Multimerge above will append a number to the end of the recipe name in case of duplicate versions.
  $list=array_multimerge($list,includeTarget('FULL_URL_TO_TARGET/api.php'));
  /*
   * Since the keys contain recipe names, 
   * and the values may contain full URLs, 
   * sort by the keys
   */
  ksort($list);