Run Bitnami WordPress Behind Load Balancer

This is mostly a note for myself after finally figuring out how to do this. The rest of the internet looks like they’d rather terminate the SSL on their own instances.

define('WP_SITEURL', 'https://xyz.com/');
define('WP_HOME', 'https://xyz.com/');
if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){

    $_SERVER['HTTPS'] = 'on';
    $_SERVER['SERVER_PORT'] = 443;
}

Then wordpress and the plugins and forcing everybody to use https all works like it’s supposed to.

Figure Out which EC2 Instance failed ELB Health Check on AWS

I have been using AWS for years and finally got around to wanting the ability to figure out exactly which EC2 instance failed the health check when the Alarm I had setup on the Load Balancer went off. The interwebs were lacking in a clear and easy to follow example on how to make this happen so I thought I might take a few minutes to explain how to set this up.

My preferred setup is to get emailed with the information about which instance(s) were unhealthy right away so I can troubleshoot the issue as soon as possible.  Kudos to this StackOverflow article for pointing me in the right direction.

Step 1: Create a new Topic to get triggered Alarm on your Load Balancer that triggers off Health Checks

Go to the monitoring tab on the ELB that you want to troubleshoot. There’s an option to “Create Alarm” on the right hand side. Select that, create a topic if you don’t have one already that gets notified anytime the Unhealth Hosts threshold is greater than zero.

ELB create Alarm and Topic

 

Step 2: Create a IAM role with the Permissions

The lamda function is going to need permissions to read the state of the ELB instances and send an email using SES. The only part of this which is a little bit tricky is that adding the second type of permissions requires finding the additional link.

Step 3: Create the Lambda

Step 4: Add the Code & Test

import boto3
import json
import datetime
from time import mktime
class MyEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime.datetime):
return int(mktime(obj.timetuple()))
return json.JSONEncoder.default(self, obj)
def lambda_handler(event, context):
elb = boto3.client('elb')
client = boto3.client('ses')
response = elb.describe_instance_health(LoadBalancerName='')
client.send_email( Source='fromemail',
Destination={'ToAddresses': [ 'samplemeail', ] },
Message={ 'Subject': {
'Data': 'AWS Notify MeEvent'},
'Body': { 'Text': { 'Data': json.dumps(response, cls = MyEncoder)}}} )
return json.dumps(response, cls = MyEncoder)

Seagate Second Mac Read Only

It took me way too long to find this and you do not need to reformat the drive.  If you’re already using the Seagate drive on one mac but can read but not write from another, then the mac that can’t write is just missing a driver.

Here’s where to download the driver:

https://www.seagate.com/support/software/paragon/

Tent Camping Reviews

My family has really started to love getting the tent out and camping together.  So much so that I thought a nice post to remind me of what we’ve liked and didn’t like.  I have a family with 5 small kids, oldest is only born in 2008, so we’re more into quiet wooded sights, beginner level hiking, and good sites to see etc…

Unfortunately, the majority of campers or camping these days refers to people that want electric sites for their RV or we’ve even seen people with window unit air conditioners for their tent!  That’s not us; when we go camping, we like the old-fashioned non-electric site and a tent.  We even sleep on the ground!   The camp chef grill is the one major luxury that we take along every time.

Missouri Tent Camping

  • Knob Knoster State Park *****  Stayed there 2 nights in summer 2016.  They have nice wooded sites, pretty good hiking trails, and a nature center with nightly shows that the kids really liked.  We really enjoyed this one and would go back.
  • Lewis & Clark State Park **  Stayed there for 2 nights in summer 2017.  We were really disappointed by the campgrounds here which weren’t really “out in nature” much.  One side was right behind residential fencing between people’s backyards.  The pros were that there was a nice playground, a pretty good beginner hiking trail within walking distance, and the lake is right there.
  • Graham Cave State Park *** Stayed 1 night in summer 2018.  They had a large no electric area and very few campers so privacy was great.  It was wooded.  The cave itself was disappointing because it had been fenced up but the hikes were great for boys 5, 7 and 9 years old.  Other con was that you could hear the interstate traffic at night.

Iowa Tent Camping

  • Palisades-Kepler State Park *****  Stayed there one night summer of 2018 and we wished we could have stayed longer.  The drop-in process was easy, the campsites were wooded with quite a few non-electric off to themselves.  An easy hike led to a great spot on the river nearby.

Illinois Tent Camping

  • Pere Marquette State Park *****  Went through St. Charles MO and took the Grafton Ferry in summer of 2018.  We really liked this park.  It has an older separate section away from all the RVs for the tent camping and the Lodge is within walking distance.
  • Illini State Park **** This was a nice park with a nice variety of sites.  We stayed there in summer of 2018 in a really wooded site instead of staying by the river or a little more out in the open.

Wisconsin Tent Camping

  • Pike Lake State Park **** We stayed here in summer of 2018.  We really liked the nearby lake for it’s nice swimming area.  The one piece we didn’t like was the check-in process or vehicle fees that go with the Wisconsin state parks.
  • Apostle Islands Area Campground **** We stayed here two nights in summer of 2018.  The best part of this campground is the location.  It’s proximity to the Apostle Islands and Bayfield were perfect.  The tent sites were off and away from the RVs which we also like.  The restrooms and showers should be in a little better shape but all-in-all, this was a good place for us.

Only Half USA Children Raised by Biological Parents

I was reading: https://www.catholicnewsagency.com/news/only-half-of-us-children-are-being-raised-by-their-married-parents-25600

 

Since I’ve spent the last 7 years of my life dedicated to helping improve outcomes for students placed in a school setting with devices, I’ve become more acutely aware of the larger societal shifts which are making it difficult for children to overcome the hurdles being thrown in their way by the culture in the USA.

There’s plenty of evidence backing up the concept that the environment most likely to help a child grow into a successful adult overwhelmingly points to a household with a married biological mother & father.  That doesn’t mean other household environments can’t raise good children, it just means the odds are best in this setting.

As an overall culture, it should be a major disappointment to us then to find out that half of all children in our country are in a less than optimal home setting by the time they graduate high school.  With an all-time low in married adults, it appears that we’re heading towards even lower percentages of children growing up in a home with their parents.

What are the implications of this going to be down the road?  Will other home settings, schools and/or other community organizations be able to adapt and fill in whatever it is that’s missing from the home?

imovie not exporting video to file (error 10004)

I was running into this issue and most of the help I found on the internet was either too time consuming or didn’t work. In this case, I eventually found the answer on an apple forum. In the past I’ve had bad luck finding such information later on so I figure’d I’d save it off on my small corner of the web.

Here are the symptoms I was experiencing:
– I had recorded a video with a different piece of software and imported to iMovie
– I added voice over & edited the video and all seemed well
– Went to export to a file and immediately it throws the error 10004 before the pie starts to fill up at all

Thanks to Bruno’s review I was able to easily resolve the issue. If only that were the first advice that I’d seen….

Anyhow, just delete the first second of the video clip and add a freeze frame if necessary to make up for it.

Then exporting works fine for me. Hooray!

Troubling Post about Parents and Kids Having Phones

If you are thinking about whether or not to get your child a phone and let them spend time on facebook, snapchat, twitter, etc…  You really need to read this article:  https://www.theatlantic.com/magazine/archive/2017/09/has-the-smartphone-destroyed-a-generation/534198/

Have Smartphones Destroyed a Generation?

Below are a few quotes that really jumped out at me.

The results could not be clearer: Teens who spend more time than average on screen activities are more likely to be unhappy, and those who spend more time than average on nonscreen activities are more likely to be happy.

There’s not a single exception. All screen activities are linked to less happiness, and all nonscreen activities are linked to more happiness.

The more time teens spend looking at screens, the more likely they are to report symptoms of depression. Eighth-graders who are heavy users of social media increase their risk of depression by 27 percent, while those who play sports, go to religious services, or even do homework more than the average teen cut their risk significantly.

 

Teens who spend three hours a day or more on electronic devices are 35 percent more likely to have a risk factor for suicide, such as making a suicide plan.

 

Children who use a media device right before bed are more likely to sleep less than they should, more likely to sleep poorly, and more than twice as likely to be sleepy during the day.

And What to Do

The article suggests that the executives in silicon valley that bring us the devices and social media services that are behind all of this are unlikely to allow the amount of use that’s associated with the troublesome increases in unhappiness, loneliness, depression and suicidal thoughts.

Even Steve Jobs limited his kids’ use of the devices he brought into the world.

 

Download Latest iTunes Reviews with a Quick Python Script

Ever wanted to be able to download the latest itunes reviews for your app to display on your website, understand & analyze user requests better, or just have a copy for yourself?

I was trying to do just that and was happy to find that itunes support RSS feeds for every app in iTunes using the app id.

It’s super simple once you know the format to start fetching your reviews and doing whatever you want with them programmatically.

How to Download Latest iTunes Reviews

1.  Find your app’s id by looking at the url to your app on itunes.

2.  Construct the url to your RSS feed by replacing the <id> with your id (just the number part).

https://itunes.apple.com/rss/customerreviews/id=<app-id-goes-here>/json

3.  Start writing code to do whatever you want with reviews

A Quick Python Demo

This sample is pretty simple but quickly shows what is possible by printing out the rating and review for the most recent reviews of the app.

import json
import requests

resp = requests.get('https://itunes.apple.com/rss/customerreviews/id=<app-id-goes-here>/json')
itunesrssjson = json.loads( resp.content)

for entry in itunesrssjson['feed']['entry']:
 print "{1}".format( entry.get("im:rating").get("label"), \
                     entry.get('content').get('label'))

Let’s say you only want to look at 5 star reviews.  Just add a quick little if statement in there.

for entry in itunesrssjson['feed']['entry']:
 if entry.get('content') and entry.get("im:rating").get("label") in ["5"]:
   print "{1}".format( entry.get("im:rating").get("label"), \
                       entry.get('content').get('label'))

 

That’s it!  Use or learn some python skills to sort, filter, fetch additional reviews and more.  Or you can always use whatever language you’re best at.

Have fun getting your reviews the quick and easy way.

8 Ways to Make your First Semester of College Successful

With the fall semester quickly approaching, it’s time for you to start thinking about what can be done to make your first semester of college successful. While the transition from high school to college may seem intimidating to some, there are several things you can do to ease this process (and hopefully ace your classes too).

1. Use a planner.

In high school it may have been possible for you to keep track of all your obligations in your head (and in some cases, with the help of your parents), but that time in your life has unfortunately come to an end. Between academic and social commitments, your bound to forget one thing or another if you solely rely on your mind to keep it all straight. My advice? Find a planner that works for you (whether you prefer paper or online) and use it religiously. Color code it. Highlight it. Love it. Take it with you everywhere. That planner will become your key to success. I actually use a combination of paper and online, as I have a Lilly Pulitzer planner for my social commitments (sorority, job, mentorship program, etc) and use the MyHomework application for my assignments and due dates.

2. Get resourceful on campus

Many incoming college freshmen tend to overlook the academic resources that are provided by their university. Many campuses offer some sort of help center or “Student Success Center” (http://success.missouri.edu) as it’s called at the University of Missouri. These wonderful places are usually filled with knowledgable and experienced tutors who are actually paid to help you be successful. Make them earn it and take advantage of this opportunity.

3. Get resourceful off campus

While your campus most likely offers on site tutors, there’s also a plethora of academic aid awaiting you on the web. A personal favorite of mine is Khan Academy (khanacademy.org) which provides students with free video tutorials on various subjects across the academic spectrum. I personally don’t know how I would’ve survived micro and macro economics without it. Other good online resources to check out? UDemy and Coursera are two other great options for online academic help. They both offer a pretty decent selection of free courses that could give you further instruction and help you be more successful in your classes.

4. Listen to your professor

If your professor advises you to read your textbook, you should probably read it. It will usually enhance what you’ve learned in class and strengthen your odds of acing the exams (assuming that’s your goal). Better yet, he or she might even tell you that the text book isn’t necessary for the class. Because of this, it also might be beneficial to wait to receive your class syllabi before purchasing your textbooks. Another note on textbooks: never buy them from the university book store. They are always overpriced. Chegg.com and Amazon.com are two reliable sites that I’ve used to find much more affordable text books – both excellent alternatives to the book store.

5. Do your research ahead of time

It’s incredible what you can uncover about your courses on the internet. Through websites like Ratemyprofessor.com and university sponsored websites, students can get a taste of what exactly they’re getting themselves into before class even begins. This can be helpful because it allows you to figure out which classes will require the most time and effort. Researching professors and course loads online is also exceptionally helpful when trying to design your class schedule each semester.

6. Get to know your professors

Getting to know your professors is not only important because it can help your grade if you’re on the fence between a B and an A, but it also can help you with networking later on down the road. In a couple years, you will panic much less when you find out you need a letter of recommendation for an internship if you’ve already taken the time to build relationships with your past professors. Start now. Find out what their office hours are each week and be a regular. You’ll thank yourself for it later.

7. Make friends

This sounds like silly advice for collegiate academic success, but struggling through class assignments can be much more bearable with the company of other classmates. You might be thinking “well obviously I’ll make friends in class” but many students tend to go to class (especially in the large lecture halls) without speaking to anyone at all. Get there a little bit early and strike up a conversation with those around you. Study groups are great. Not to mention, it’s way more fun than studying alone.

8. Study on the go

Between sorority events and business school obligations, I found myself having very little time to just be able to sit down and study. My favorite trick? Save your documents or study guides to your myHomework app and pull them up at any time to study discreetly. I did this countless times throughout freshman year and it may just have saved my biology grade. For more serious studying, you could create new materials with StudyBlue or Quizlet.

 

Guest Author:

Katelyn Entzeroth – University of Missouri- @katentz

Salesforce Error: “Mismatched integration value and ISO code for field: Country Code,”

I was trying to import a .csv of Lead data into salesforce today.  Salesforce’s import tool is terrible and you have to use something from the AppExchange to get error messages.  You’ve probably already discovered that if you’re reading this post.

Anyways, I found that the issue with trying to import any data with a country outside of the United States was because the Country and State Picklists had the United States set to the default country.  I changed that default to “none” and the exact same import file ran flawlessly.

I hope this saves someone else some time someday.