Search This Blog

Custom Search

Mar 1, 2012

AdSense: Script

It’s totally free and I encourage you to use it in whatever way you wish. As ever, I outsourced the overwhelming majority of the work, so can’t take all the credit really. If it ads some joy to your life, you’re welcome to buy me a coffee!

Want to build your own AdSense revenue predictor or mobile app? You can download the script here –  on the house.

The code is fairly well documented. You’ll need to populate config.inc with your AdSense and SQL credentials. If you want to plug-in your own intraday trend (no two accounts will be the same, after all), collect the data into SQL, make some averages and then plug the data into the percentages.inc file.

Since this involves sensitive data, make sure you’re running this on a server you control/trust and take precautions to keep your information safe (protecting the directory, for example). You can execute gas.php via the command line, or better yet, as a CRON job.

AdSense: DIY Mobile Web App

A further improvement would be to create push-notifications/alerts if the the predicted revenue falls below an accepted range. I’m lacking reliable data/net access this week, so a daily SMS report would also make for a useful extension. Something to look into another day.


The official app was well needed; there’s a whole bunch of unofficial 3rd party apps which can show you similar data, but all of which pose a significant security risk (given the need to share your log-in credentials). It’s pretty, simple to use, and provides all the reports you’d actually want on-the-go. It does lack the all new revenue predictor and suffers from the annoyance of a timed user-session (thus requiring you to periodically login), meaning that it can still be helpful to create your own DIY mobile app – the topic of this post.

Using our previous work with a self-made script, it’s surprisingly easy to make your own “app”. The script now spits the output as HTML and both Android and iOS allow you to create homepage URL shortcuts. The result is one-click access to your statistics without the need to log in, or unnecessarily trust a 3rd party developer. Plus, since it’s your app, you can develop it your hearts content, perhaps to report other pertinent information for your website/business on the same page. Okay, okay, it’s not really an “app” in the true sense, but it feels and looks pretty close to one.

I started drafting this post just a few days before Google released their official AdSense Android app, which has made most of what I was going to say pretty redundant.

Feb 29, 2012

Cheap Freezer Dinner-Cranberry Apricot Chicken

(great dish for guests!)
Ingredients:
1 lb. chicken (raw, any kind)
1 can whole cranberry sauce (not just for Thanksgiving!:))
1/2 apricot preserves
1 C. french or catalina dressing
1 pkg. onion soup mix
Gallon Ziploc Freezer Bag
Directions:
Put all ingredients except chicken in ziploc freezer bag and squash and mash to mix (this the the kids' favorite part!). Add chicken and mix well. Pour into 9 x 13 greased pan at 350 for 35-40 minutes and serve over rice. If are preparing this for later use, simply put ziploc bag with the sauce and chicken directly in the freezer, defrost when ready to use and bake as directed above.

Cheap Freezer Dinner-Kalua Pork

Ingredients:
Large Pork Loin (around 8 lbs., about $1.58 per lb. at Sams)
coarse Kosher Salt
liquid smoke (in the spice aisle)
Sandwich rolls, any kind
Plastic Wrap
Aluminum Foil
Directions:Preheat oven to 225 degrees. Cut pork loin in half. Lay out two large sheets of aluminum foil. Lay two large sheets of plastic wrap on top of foil. Place half of pork loin on the plastic wrap (this keeps the moisture in! It's an amazing slow-roasting secret!:)). Sprinkle generously with kosher salt and liquid smoke, rub all over pork loin. Wrap up plastic wrap tightly around pork loin and then wrap with aluminum foil. Place in large roasting pan. Repeat with other loin half. Bake at 225 degrees 7-10 hrs. until done. Serve with soft rolls, cheese, bbq sauce, whatever your family likes. YUM!

Cheap Freezer Dinner-Crab-Stuffed Pork Loin


Ingredients:
Large Pork Loin (around 8 lbs., about $1.58 per lb. at Sams), cut into just under 1" slices--the butcher at Sams Club can do this for you. You'll get about 18 slices.
1 lb. lump imitation crab meat
1 1/2 c. plain bread crumbs
1 can crushed pineapple, drained
1 cup french dressing

Marinade Ingredients:
6 Tbsp. soy sauce
3 Tbsp. Brown sugar
1/4 tsp. powdered ginger
1 tsp. garlic
dash red pepper flakes
dash black pepper
3 Tbsp. tomato sauce (or ketchup if you're in a pinch)

Directions:
Place all marinade ingredients in a gallon Ziploc Freezer bag and mix well. Slide through side of pork loin to make a pocket (see video tutorial). Mix crab meat, bread crumbs, crushed pineapple, and french dressing in a medium bowl. Stuff about 2-3 heaping tablespoons crab mixture into pork loin pocket and place in marinade bag. Repeat with all pork loin pieces (you can fit about 6 in a bag). Place directly in freezer. When ready to cook, defrost and grill 7-10 minutes on each side.