Tyler Longren

Hi! I'm Tyler Longren, a freelance web developer. I have two beautiful daughters and a very patient wife! I like PHP, JavaScript, WordPress, Git, HTML5 & CSS3, and other neat things. I really love the open source community, too. You can find me on twitter or Google+, and Github. You can view my online portfolio at https://longrendev.io, and you're at my blog, longren.io.

Fix StanleyWP WordPress Theme Portfolio Grid

wp-stanley

Fix display of portfolio grid rows

Back in September of 2014 I wrote about using the StanleyWP WordPress theme for a portfolio site. After I added some projects, I noticed the grid on the Portfolio page template wasn’t displaying rows correctly. I even noted it in my original post, towards the end.

I’ve had a few people contact me about how to fix the StanleyWP portfolio grid issue, and earlier today Arun left a comment asking how to fix the grid issue.

You need to be using a child theme for this, it’s just good practice. If you don’t know how to create a child theme, read my post on creating a child theme. It’s really easy to do, but may require you to reset your menu or some widgets after changing to the child theme.

Anyway, Arun confirmed that this gist fixed the problem for him:

Just save that code as template-portfolio.php and put it in your child theme directory. Your portfolio should now show three projects per row. No CSS or anything else needs to be modified, just that one page template.

Let me know if you have any issues or questions.

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. :)

More Inbox by Gmail Invites

3037483-poster-p-1-google-reimagines-email-with-their-new-inbox-app

I have 10 more to give away

Just like with the last Inbox by Gmail invites post, I’ve got 10 invites for Inbox by Gmail. If you want one, just leave a comment below.

As usual, first come, first serve.

March 5, 2015 Update

I have 10 more to give away. Leave a comment (put your gmail address in the email field so only I can see it).

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. :)

Using Gmail SMTP Servers to Send Email From WordPress on DigitalOcean

wpdo

Use Gmail SMTP Servers for Sending Emails from WordPress

After quite a bit of back and forth between sendmail, postfix, and exim, I’ve settled on using msmtp for sending emails from my servers/droplets at DigitalOcean (affiliate link).

MSMTP is very lightweight and has the ability to send emails via an existing SMTP server, like Gmail’s or Yahoo’s.

To get it working, there’s a few tricks. I’ve pieced this together from this post and this post. And when on DigitalOcean, there’s an IPv6 issue that causes major delays in sending the email, which there’s a fix for at the end of this post.

1. Install msmtp

2. Configure msmtp to use Gmail

Open up /etc/msmtprc as root: sudo nano /etc/msmtprc, and add the following, removing whatever else is there:

You’ll want to replace the user directive with a valid Gmail email address, a Gmail account or a Google Apps email address will work, too. Don’t forget to change enter-password-here! to the actual password for the Gmail account your using.

Save /etc/msmtprc.

3. Remove Sendmail

Run this:

4. Setup Some Aliases

Lots of software on Linux systems uses the sendmail command. Instead, we’re using msmtp, so we’re essentially invoking msmtp when the sendmail command is run.

5. Tell PHP About msmtp

First, locate your php.ini file that’s being used by Apache. It’s typically in /etc/php5/apache2/php.ini. If that’s not it, use PHP’s phpinfo() function to find the location of your php.ini file.

Find sendmail_path = in php.ini and replace it with this:

Now you should be able to send mail using PHP’s mail() function, which will use the Gmail SMTP server to send emails. Add this to a PHP file and access it through your browser to see if it works:

6. Disable IPv6 If You Experience Slowness

Open up /etc/gai.conf like so:

Now, look for a line that looks like this: #precedence ::ffff:0:0/96 100. Uncomment that line (remove the #) and save /etc/gai.conf. An explanation of why this helps can be found in this comment at the DigitalOcean article.

All Done

That should be it. If you run into any issues please do leave a comment, I’ll do my best to help you out. I may have missed a part, so no guarantees this will work for you. It does however work wonderfully on a DigitalOcean droplet that’s running Ubuntu 14.04 with a pretty standard LAMP stack.

You should now be able to send email from WordPress on DigitalOcean.

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. :)

Simple Server Monitoring with Ping.gg

ping.gg

It really is the world’s most simple server monitoring service

Best of all, Ping.gg is currently free! Ping.gg will ping your server constantly, with an interval of 10 seconds.

Victor, the ping.gg creator, will be releasing all the Go code on GitHub eventually, but will keep the UI/PHP pieces to himself. It sounds like HTTP response checking is also in the works:

There is a ping daemon (Go app) that is listening for a couple of redis pub/sub channels for hosts to start and stop pinging. Each host is handled by a different goroutine. When something goes up or down, it publishes the host in another 2 redis pub/sub channels.

This is what I’ll release as open source, before I do I’d like to refactor it so it’s not tightly couple with redis, but rather have an interface there, so it’s easy to change the redis pub/sub interface with, for example, HTTP calls.

Monitor a Site with Ping.gg

To monitor a site (my.example.com), issue this command:

I’ll let Victor explain how it works:

After you provide a hostname or IP and your email address, you’ll be sent an email with 3 generated URLs that you can to click to start, stop and delete your tracking. Every time you server goes down or back online you will receive a notification, which will also include the control URLs. BTW, check your spam folder… you know the drill.

Every time my.example.com is unreachable, you’ll receive an email at [email protected]. An example email is below.
ping.gg-down-email

That’s It

Issuing that curl command is all you need to do. You’ll receive an email after adding a site to monitor asking you to active the monitoring. There’s also a link in that email so you can stop or pause monitoring of a site if you wish.

Ping.gg allows 10 sites to be monitored per email address. Ping.gg considers your server/site to be down when it fails to answer 6 pings in a row.

Hoping that Victor builds this into a full fledged service with account dashboards and all, just because it’s sooo simple. The Terms of Service possibly indicate that a professional service may be available at some point:

As previously stated, this is not a professional service (not now at least) so by using this service you agree to the following:

  1. You use this service at your own risk.
  2. There is no warranty that the service will work properly or at all.
  3. Your alerts might be terminated without notice.
  4. The service can stop operating anytime without notice.

Go ahead and give a try, it’s been very reliable for me and have had no issues with it. Keep the Terms of Service in mind, however.

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. :)

Inbox by Gmail Invites

3037483-poster-p-1-google-reimagines-email-with-their-new-inbox-app

A Christmas gift for you

I’ve got 10 invites for Inbox by Gmail. If you want one, just leave a comment below.

First come, first serve.

Final Update

I’ve exhausted all my invites. If you want one, leave a comment anyway, others have been sending invites to people here, too. Or, check the Designer News thread. A guy there is offering invites if you send him your email address.

Real Final Update

I’m out of invites, but post your email if you want one. A number of kind individuals have been sending invites to people leaving their emails in the comments.

Update Jan 22, 2015

I now have 9 more invites to send out for those of you that still want an invitation to Inbox by Gmail. Just leave a comment and I’ll get one sent to you.

Update Feb 20, 2015

Got 10 more invites, view this post to request one.

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. :)