Skip to content

Instantly share code, notes, and snippets.


Jonathan Bell jonathanbell

View GitHub Profile
jonathanbell /
Last active Jan 25, 2021
August 28 2014 - InstaRss


I was looking around for a way to get a user's public Instagram feed as an RSS feed without using the Instagram API when I came across this question on Stack Overflow.

Probably the best way to do this, would be to use the Instagram API. However, I had no desire to sign up for an Instagram account.

Initially, this answer on Stack Overflow suited my needs quite well. However, as fate would have it, Instagram changed its HTML output and the page's JSON data structure changed. Since the idea is quite simple (we're just screen scrapping here) I decided to write my own script. If this works well for you, consider upvoting my answer on Stack Overflow:

EDIT August 2017: I no longer support this scipt. The Instagram HTML output of any given user page changes often and it's been a fun game of cat and mouse but I no longer have a need for an I

jonathanbell / New Theme:
Last active Sep 30, 2018
November 21 2015 - New Theme:
View New Theme:

New Theme:

My site has a new look and feel! I thought I should update its theme to a more modern one. I’m growing, along with my blog’s theme (awwww, how cute) 😂.

Generally, what I write on my blog is pretty personal and I write as if no one is reading. I like to do that because it keeps it personal and honest and I can be myself.

However, in my professional life I always write code as if another developer will be (at some point) reading it. Doing this, can take more time than just haphazardly writing functions and selectors that won't scale or make sense in the future. And, while I have no plans of releasing the new theme to the open source community at this time, I tried to write the theme so that it could be used on anyone else's site with minimal headache. One item that is currently hard-coded is the photo and the personal "greeting message" at the top of the homepage.

jonathanbell / MS Ends Support for IE
Last active Sep 30, 2018
January 9 2016 - Microsoft to End Support of IE 8,9,10 & 11
View MS Ends Support for IE

Microsoft to End Support of IE 8,9,10 & 11 = Happy Birthday to Me!

Microsoft has announced that it will end support for Internet Explorer versions 8, 9, 10, and 11 on January 12th 2016! That’s just one more reason to celebrate my birthday!! (My birthday is pretty close to this date).

I feel like Microsoft has given me an early birthday gift, just by making this announcement. Long have I toiled with this inconsistent, piece-of-poop browser. No longer! I am officially dropping my support (in all future web projects) for IE 8, 9, 10 & (even) 11! It’s been way too long – and IE has always caused me so much grief. I'm done – I'm not accepting any new projects that want to support these ancient and unreliable browsers. There will still be IE Edge to contend with but, from what I hear, that browser is quite standards compliant and modern. We shall see! 😉

It's been a long road to travel with you, IE - but now I must bid you adieu. Happy

jonathanbell / Obtaining a Perfect Score with Google PageSpeed
Last active Nov 19, 2018
December 11 2016 - Obtaining a Perfect Score with Google PageSpeed Insights in WordPress
View Obtaining a Perfect Score with Google PageSpeed

Obtaining a Perfect Score with Google PageSpeed Insights (in WordPress or other systems)

My personal blog ( just got a little uglier and a little faster.

I recently set a lofty goal for my blog. I wanted the site to achieve a perfect score (100/100) with Google PageSpeed Insights. Google PageSpeed Insights is a (very picky) tool to help front-end people make their pages load quickly in the browser.

A lot of people will tell you that you don't need a perfect score from Google to have a fast and performant website. I would tend to agree – especially after executing these changes 😓. You don't need to have a 100/100 score in order to have a speedy, modern, and accessible website. Still, I was hungry to try for the 100/100 score! After I got going on this idea 100 seemed like the holy grail. I wanted it. I hungered for it. After a lot of fussing, I got it. Well, ok.. I scored 99/100 but you'll see why I lost one point

jonathanbell / Connect PHP to
Last active Sep 30, 2018
January 28 2018 - How to Connect PHP to LDAP
View Connect PHP to

How to Connect PHP to LDAP

The other day I needed to connect PHP to my organization's LDAP/Active Directory server. I hadn't done this before and found it pretty difficult/annoying.

Hopefully, this will help someone else in the future or even just the future version of me if I have to do this again. I've heavily commented the code below for clairity. We are just outputing a form that asks for the LDAP credentials. If we do not have any relevant $_POST values submitted to our webpage/server we output the form. Otherwise, we will attempt to login to the LDAP server with the credentials provided and retrive some of the user's information.

Now that the user has passed authentication, you could check to see if the user is part of a certain group or has certain value(s) associated with their account.

jonathanbell / Connect Mac OS X to a Samba File Server Remotely via
Last active Sep 30, 2018
February 20 2018 - Connect Mac OS X to a Samba File Server Remotely via PHP
View Connect Mac OS X to a Samba File Server Remotely via

Connect Mac OS X to a Samba File Server Remotely via PHP

Ever had to connect a Mac web server to a Samba file share remotely via a PHP/HMTL form? No?! Really!? Are you sure?? Check again, I'll wait.

What's that you say!? The answer is still no!? Oh. Well.. OK.

Well anyways, I had to do this the other day and I'm going to write it down here so that I don't forget how I did it.

My work uses a little Mac web server to serve up a GitList installation (a listing of all our repos). Problem is, the Git repositories live on our LAN (Samba) file server. The Mac needs to talk to the LAN so that it can read the Git repositories and display them on the page via GitList. The Mac web server doesn't have any credentials of its own to supply to the Samba share, so, with this scipt, we ask the user for their credentials and then use those to connect to the Samba share.

jonathanbell / Jonathan Goes
Last active Sep 30, 2018
March 17 2018 - Jonathan Goes Windows
View Jonathan Goes

Jonathan Goes Windows

It's "official", I have switched to Windows! Some may call me crazy (and maybe I am) but I've actually been enjoying the web dev experience on Windoze. Like those brave soles before me, I have decided that it's time to combat the Mac monoculture and try something different.

It's strange to me that the web is all about open technologies and inclusiveness and then we all use Mac and preach our technology choices hard from the rooftops. I started off using Windows for photography in 2005 on a severely under powered machine, switched over to Mac around 2007 and then became a semi-hardcore Linux user from about 2013 to 2018. I've come to learn that it really doesn't matter which machine the web developer is using, as long as they get the job done at the end of the day.

Tools That Made the Switch Easier

Obviously, I couldn't give up the tools that I need to do my job. I was curious if there would be useful alternatives on Windows. Tur

jonathanbell / Coding
Last active Sep 30, 2018
April 3 2018 - Taking a Coding Sabbatical
View Coding

Taking a Coding Sabbatical

I did it! I left my secure job. I even left without having another job lined up. My dad told me never to do that (sorry, dad).

The plan for the next 3 months is to accept only small jobs and to study a lot in my spare time. I want to level up my JavaScript skills and to eventually get a local or remote position with a company that I find engaging and inclusive.

I feel like quiting my job was necessary as I simply did not have enough time available during the day in order to study and work. I need several hours a day free and clear if I'm to be efficient. Web developers constantly need to be learning these days. Every time you turn around there is a new framework or a new tool or a new best practice bandwagon that we should all be jumping on. It's very hard to keep up - I'm sure that you agree.

It's not surprising that the 2018 Stack Overflow Developer Survey found that developers really want code and that they want to learn

jonathanbell / Scrape HTML Into an RSS
Last active Sep 30, 2018
April 4 2018 - Scrape HTML Into an RSS Feed with PHP
View Scrape HTML Into an RSS

Scrape HTML Content Into an RSS Feed

If you still like RSS as a technology (like I do), then you might be interested in creating an RSS feed for a website that no longer supports RSS. That way, you can point your RSS reader to a PHP file on your server and have your RSS reader update when new content is created. Yes folks, we are screen scrapping with PHP today!

One of my favourite photographs is Hedi Slimane. I really like his style and exculsive use of black and white. However his blog site doens't support RSS. Since I really want to know when new content is posted, I created a little PHP script that will check his site and return an XML RSS feed from my server to my RSS reader.

This is just an example of what is possible in the vast and scary world of screen scraping. I just thought that I would post this script up as an example.


jonathanbell / How to Setup SSH
Last active Sep 30, 2018 — forked from stormpython/
April 10 2018 - How to Setup SSH Keys
View How to Setup SSH