One little problem setting up Cloudflare SSL via cPanel for a site

I’m not going to give a full tutorial on how to setup Cloudflare SSL for a web site using cPanel for its hosting management. There are better resources for that. However, I did run into an issue that took me a while to track down and I wanted to capture that here in hopes that it saves someone else some time.

I had everything setup on the Cloudflare side and added the keys to cPanel for my domain but received the following error:

The system did not find the Certificate Authority Bundle that matches this certificate

There was a spot in the cPanel SSL setup page for adding the CA Bundle but my Google searches weren’t returning what I needed. Somewhere along the way I finally ran into my answer, which can be found at this Cloudflare support page. Once I added the Cloudflare root certificate from that support page, my site was enabled to serve up pages via HTTPS.

Note: I setup another domain for SSL via this same setup and didn’t have to enter the Cloudflare root certificate again.

Calling a Slack Web API method from a slash command app

I’m currently trying to build a little Slack app. The (Botkit based) app is a “slash command” that also needs access to the team and user info Slack web API methods.

I ran into a problem where I needed an access token that Botkit stores in its users object store. The issue is that when I need to use the access token to call the Slack web API methods, I need to find that token. I wanted to lookup that access token via the team_id that is passed in through the slash command message, but I couldn’t if the token is in the users object store, with the install user’s ID as the key.

Here is an example of what I had in the Botkit users and teams object stores after a user installed my app:

botkit:store:teams
{"id":"T1DDTABCD","createdBy":"U1DDKABCD","url":"https://someslackteam.slack.com/","name":"slack-team-name"}

botkit:store:users
{"id":"U1DDKABCD","access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c","scopes":["identify","commands"],"team_id":"T1DDTABCD","user":"johndoe"}

When my app gets a message, it doesn’t have access to the install user’s ID, but it does have the team ID. I needed to pass in that “access_token” for the web API calls like this:

My workaround was to get the access_token from the install user during the install process and store it with the team. This is what that code looks like:

That happens once during install and adds the access token to the teams record:

botkit:store:teams
{"id":"T1DDTABCD","createdBy":"U1DDKABCD","url":"https://someslackteam.slack.com/","name":"slack-team-name", "access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c"}

botkit:store:users
{"id":"U1DDKABCD","access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c","scopes":["identify","commands"],"team_id":"T1DDTABCD","user":"johndoe"}

I could then call the Slack web API like this:

Notice I’m calling the teams storage and passing in the message.team_id to look up the team for the user who submitted the command.

The one thing I was never told

 
During the last 2+ years, since being hit by a driver of an SUV while I was riding my bicycle, I was advised on a lot of things – a lot of important things. There was lots of medical and dental advice, and I’m thankful for it. There was quite a bit of legal advice, and I’m thankful for that too. But there was some advice I never received: You need to account for the mental and emotional toll.

I spent so much of my time focused on the “next step” in my recovery that I neglected the mental and emotional side of the equation. I felt “OK” – or so I thought. All attention was paid to the physical and legal components of recovery, and meanwhile, I was pushing forward on near empty without realizing it. I never saw a counselor. I never talked to anyone who asked me questions that would press me a bit beyond, “how’s your body healing?” The doctors I saw never advised me to talk to anyone or to at least be aware of some potential pitfalls beyond the physical. I’m starting to realize that all that trauma, all that stress that comes with recovering from such an event over many months, and all that pressure I put on myself to “get back to normal ASAP” has caught up to me.

I don’t write this to lay blame on anyone. I’m writing this for those who may come across this post as they struggle through their own recovery. Go talk to a counselor. Go talk to someone who will ask questions that friends and family aren’t likely to ask because they don’t even know to ask them. Acknowledge the struggle is beyond what you feel physically, the endless appointments, the non-stop focus on getting back to “normal”. You likely won’t even realize you need to talk to someone, but you do.


I’m capturing my journey towards recovery after being hit by an SUV while riding my bicycle on February 8th, 2014. I’ve learned quite a bit along the way and want to share those lessons. I’m not a doctor, lawyer, or any other sort of expert in this area. Any insights I provide along the way should be taken as my insights to my particular situation. In other words, seek professional counsel if you find yourself in similar circumstances. See more here.

It’s just like riding a bike

 
The most popular (and annoying) question I was asked shortly after being hit by an SUV while riding my bicycle was whether I was going to ride my bike again. My wife was asked that question too – a lot. I think she hated the question more than I did. My response was often made with a sly smile and then something not so clever like, “If you were in a car crash, would you drive again?” I wanted to ride again ASAP. My wife was slightly less enthusiastic. She’s the one who got the call that I had been hit by an SUV. She’s the one who saw me battered and bloodied in the ER. She’s the one who had to deal with picking up the pieces for months afterwards. I didn’t care what anyone else thought about me riding again except my wife. If she really (REALLY) didn’t want me to ride again, I would stop. We talked about it and eventually came to the agreement that I would ride, even though she wasn’t going to ever love the idea. To this day, I text her before every ride, letting her know where I’m riding and about how long I think it’ll take. If she’s away from the house, then I also text her when I get back. If I don’t send those text messages – I’m in trouble – big trouble.

I don’t remember a thing about getting hit. Doctors have told me it’s best that I don’t remember, otherwise I’d likely experience PTSD symptoms of some sort. I didn’t have any fear of riding with traffic. What I did have hesitation about was riding in quieter neighborhoods with lots of side streets entering from my right, similar to the place where I got hit. My first time back on the saddle was Thursday, April 17, 2014 – a commute to and from work. My body didn’t feel too good, but mentally and emotionally it was great to be back out there. I didn’t ride a lot in those early days. My physical therapist said it was fine to ride (he was also a fellow cyclist), but to not over do it. He said being in that riding position was going to be a bit painful for a while. He was right. My neck bothered me the most, but my shoulders and left wrist also didn’t feel too good early on either. I eased back into riding. I was happy to be able to ride at all, especially only a little over two months after being hit.

Continue reading

Let’s get physical

 

I had to wait to start physical therapy until the cast on my left wrist came off. That took a little over six weeks. I needed physical therapy mainly for my wrist, my left (fractured) clavicle, and right separated shoulder. My neck went along for the ride, though it probably gave me the most problems through the year (2014) I got hit. It didn’t feel “normal” until the end of 2014, maybe the start of 2015. Looking back, I should’ve pushed hard on the doctors to do something about my neck. Lesson learned.

Physical therapy (PT) was a pretty foreign concept for me. I remember spending a brief amount of time in high school getting my knees looked at due to tendonitis, but there wasn’t much “physical” there aside from some ultra sound sessions. In total, I did about eight weeks of PT, with each week including three 1.5 hour session days. Each early morning session started the same: heat, ultra sound on my wrist and both shoulders, and then stretches with the physical therapist. From there I would head over to the fitness area of the facility and do the equivalent of riding a bike with my hands. I’d crank away with my arms for ten minutes before starting any exercises. I felt like a real pro.

Continue reading