Day: June 19, 2016

Pineapple Upside-Down Cupcakes

Pineapple Upside-Down Cupcakes

Ingredients

  • 1 can (20 oz) sliced pineapple, drained, juice reserved
  • 1 box Betty Crocker™ SuperMoist™ yellow cake mix
  • 1/2 cup vegetable oil
  • 3 eggs
  • 1/3 cup butter, melted
  • 2/3 cup packed brown sugar
  • 12 maraschino cherries, cut in half

Directions

Heat oven to 350°F. Spray 24 regular-size muffin cups with cooking spray. Cut each pineapple slice into 4 pieces; set aside. In large bowl, beat cake mix, oil, eggs and reserved pineapple juice with electric mixer on low speed 30 seconds. Beat on medium speed 2 minutes, scraping bowl occasionally. In small bowl, stir together melted butter and brown sugar. Spoon 1 1/2 teaspoons butter mixture into each muffin cup. Top each with 2 pineapple pieces. Place cherry half, cut side up, in center of pineapple pieces. Spoon 1/4 cup batter into each cup. Bake 20 to 25 minutes or until toothpick inserted in center comes out clean. Cool 5 minutes. Run knife around edge of cupcakes to loosen; invert onto cookie sheet.
Serve warm!!

Source: Pineapple Upside-Down Cupcakes

Sample List (PHP)

Sample List (PHP)

Date: 08/21/2009
Program Name: Sample List (PHP)
Description: The purpose of this PHP program is get records of a database, and show only the last 30 items.

<?php
  session_start();
  include ('request_processor.php');
  include ('********.php');
  include ('menu.php');
  include ('head.php');
 
  //were going to check of the were able to connect to the database.  If we can not then print a message that we can not
  $result = con_test();
  if (!$result) 
  {
      echo ('Connection status: <b><span style="color:red">error</span></b> <br /> <p>Please check to see if the MySQL database service is on.');
      exit(0);
  }
  else
  {
    if ($_SESSION['login'] == '') //indicating that if the variable is not set than the 
    {  //print the login page
      print ("<table align=\"center\" border=\"0\"><form action=\"login.php\" method=\"post\"><table border=\"0\" align=\"center\">");
      print ("<tr><td>User Name:</td><td><input type=\"text\" size=\"30\" maxlength=\"28\" name=\"Name\" /></td>");
      print ("</tr><tr><td>Password:</td><td><input type=\"text\" size=\"30\" maxlength=\"28\" name=\"pass\" /></td>");
      print ("<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Login\" />");
      print ("<input type=\"button\" value=\"Lost Password\" /></td></tr></table></form></body></html>");
      $_SESSION['login'] = 'check';
      exit(0);
    }
    elseif($_SESSION['login'] == 'check')
    {
      //Will start first by openning a connection to mysql
      $connection = con();
 
      //get the name and password from the login page
      $name = $_POST["Name"];
      $pass = $_POST["pass"];
 
      //Create the query command for MySQL
      $query = "select * from users where UserName = '$name' and password = '$pass'";
 
      $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
 
      if (!mysql_fetch_object($result))
      {
				$_SESSION['login'] = '';
				print ("I am sorry but the username or password does not match!<br /><a href=\"/portfilo/login.php\"><td>Go Back</a>");
				exit(0);
      }
      else
      {
				$_SESSION['login'] = 'ja';
				head();  //Create the html headers
				styles(); //Then the styles
				menu();   //Menu option
				print ("This is a sample programming Work.");
      }
 
      // close connection
      mysql_close($connection);
    }
    elseif ($_SESSION['login'] == 'ja')
    {
      head();  //Create the html headers
      styles(); //Then the styles
      menu();   //Menu option
 
      print ("This is a sample programming Work.");
    }
    // Session cleanup
    session_destroy();
  }
?>
Sample Login Program (PHP)

Sample Login Program (PHP)

Date: 08/18/2009
Program Name: Sample Login Program (PHP)
Description: The purpose of this PHP program is allow a user to login and view the content of a page. If the user does not supply the correct login information, then the program will print out a message stating that the information is incorrect. In addition, The program checks to see if it’s able to connect to the database. If it can not than it will display a message stating that it can not connect to the database.

<?php
  session_start();
  include ('request_processor.php');
  include ('********.php');
  include ('menu.php');
  include ('head.php');
 
  //were going to check of the were able to connect to the database.  If we can not then print a message that we can not
  $result = con_test();
  if (!$result) 
  {
      echo ('Connection status: <b><span style="color:red">error</span></b> <br /> <p>Please check to see if the MySQL database service is on.');
      exit(0);
  }
  else
  {
    if ($_SESSION['login'] == '') //indicating that if the variable is not set than the 
    {  //print the login page
      print ("<table align=\"center\" border=\"0\"><form action=\"login.php\" method=\"post\"><table border=\"0\" align=\"center\">");
      print ("<tr><td>User Name:</td><td><input type=\"text\" size=\"30\" maxlength=\"28\" name=\"Name\" /></td>");
      print ("</tr><tr><td>Password:</td><td><input type=\"text\" size=\"30\" maxlength=\"28\" name=\"pass\" /></td>");
      print ("<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Login\" />");
      print ("<input type=\"button\" value=\"Lost Password\" /></td></tr></table></form></body></html>");
      $_SESSION['login'] = 'check';
      exit(0);
    }
    elseif($_SESSION['login'] == 'check')
    {
      //Will start first by openning a connection to mysql
      $connection = con();
 
      //get the name and password from the login page
      $name = $_POST["Name"];
      $pass = $_POST["pass"];
 
      //Create the query command for MySQL
      $query = "select * from users where UserName = '$name' and password = '$pass'";
 
      $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
 
      if (!mysql_fetch_object($result))
      {
				$_SESSION['login'] = '';
				print ("I am sorry but the username or password does not match!<br /><a href=\"/portfilo/login.php\"><td>Go Back</a>");
				exit(0);
      }
      else
      {
				$_SESSION['login'] = 'ja';
				head();  //Create the html headers
				styles(); //Then the styles
				menu();   //Menu option
				print ("This is a sample programming Work.");
      }
 
      // close connection
      mysql_close($connection);
    }
    elseif ($_SESSION['login'] == 'ja')
    {
      head();  //Create the html headers
      styles(); //Then the styles
      menu();   //Menu option
 
      print ("This is a sample programming Work.");
    }
    // Session cleanup
    session_destroy();
  }
?>
Security Update Check Using GLSA

Security Update Check Using GLSA

Date: 08/20/2009
Program Name: Security Update Check Using GLSA
Description: The object of this script is to get an update respiratory from a Gentoo server and check to see if their is any security issues that effect a system.

#!/bin/bash
 
# The script will check for new Security updates available in portage

#Information needed inorder to mail the admin
echo "From: root@test.com" >> $stat
echo "To: admin@test.com" >> $stat
echo "Subject: System Security Check" >> $stat
 
echo -e "Security Check Report for $HOSTNAME $(date)\n-------------------------------------------\n" >> $stat
#Were going to update The package Libarary
emerge --sync >> $stat
 
# Then check if it went ok
result=$(grep 'metadata/glsa/timestamp.chk' /tmp/test.txt)
 
if [ !$result ]; then
    echo -e "The Portage Library Update Failed. Here is the last message that was picked up by Portage.\n" >> $stat
    tail -n10 /tmp/test.txt >> $stat
    echo -e "\n-------------------------------------------\n" >> $stat
    echo -e "\nThings to Check with the system:\nPlease check if the system is able to resovle name server.\nCheck if their is any conitivity on the network.\nCall an Admin!!" >> $stat
else
    echo -e "The Portage Library Update Works! Doing a security Check on the system\n" >> $stat
    glsa-check --list affected >> $stat
    echo -e "\n System security Check Completed.\n-------------------------------------------" >> $stat
fi
 
#Mail the Results
cat $stat | /usr/sbin/sendmail -t -bm -v
#Clean up the mess
echo "" > $stat
Slow-Cooker Barbecued Ribs

Slow-Cooker Barbecued Ribs

Cooking Info Tools

Measuring Guide
Slow Cooking Conversions

Ingredients

  • 3 1/2 pounds pork loin back ribs
  • 1/4 cup packed brown sugar
  • 1 teaspoon salt
  • 1/2 teaspoon pepper
  • 3 tablespoons liquid smoke
  • 2 garlic cloves, chopped
  • 1 medium onion, sliced
  • 1/2 cup cola
  • 1 1/2 cups barbecue sauce

Directions

Spray inside of 4- to 5-quart slow cooker with cooking spray.
Remove inner skin from ribs. Mix brown sugar, salt, pepper, liquid smoke and garlic; rub mixture into ribs. Cut ribs into 4-inch pieces. Layers ribs and onion in slow cooker. Pour cola over ribs.
Cover and cook on low heat setting 8 to 9 hours or until tender. Remove ribs from slow cooker. Drain and discard liquid. Pour barbecue sauce into shallow bowl. Dip ribs into sauce. Place ribs in slow cooker. Pour any remaining sauce over ribs. Cover and cook on low heat setting 1 hour.
Note: This recipe was tested in slow cookers with heating elements in the side and bottom of the cooker, not in cookers that stand only on a heated base. For slow cookers with just a heated base, follow the manufacturer.s directions for layering ingredients and choosing a temperature.

Tips

(Total time will vary with appliance and setting.)

Ribs go great with deli coleslaw, biscuits and frosty mugs of beer.

Spraying the inside of the slow cooker with cooking spray makes cleanup a snap.

%d bloggers like this: