Testing WordPress Youtube Link Preview

June 15, 2015 at 12:45 pm

How much SHOULD you be paying for web hosting and web development?

June 27, 2014 at 2:27 pm

Web Development can become a tricky thing to budget for when you don’t really know what your options are or how much those options should cost. This really great tool which is 100% FREE will ask you a couple of questions and give you some really valuable insight into how much you can expect to pay for various services.

Try it out for FREE here.

Here’s some of the advice I got regarding hosting…

Free Quote Estimation

How to debug SSL?

June 16, 2014 at 11:57 am

Until quite recently, this blog post would have consisted of me explaining how you use Firebug to inspect each request to see if any URLs are being called without “https”. Luckily that’s no longer necessary, thanks to this very cool tool:

whyNoPadlock

i.e. This site: http://www.whynopadlock.com/

It allows you to enter the URL giving you problems, and breaks down exactly why the SSL isn’t doing what it should. Here’s an example:

notSecure

How I Got Back Into my Centos Server After Messing up my IPTables and SSH Port

May 24, 2014 at 5:12 am

lockWhat I did seems to be a fairly common mistake, but I still feel pretty stupid. I changed my SSH port from the standard 22 to 1000. This would’ve been fine, if I didn’t forget to run this afterwards:

iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 1000 -j ACCEPT

The net effect was that when I tried to log back in, the port was not open. Luckily, there are two ways that you can get out in a scenario like this.

The first method didn’t work for me, because I couldn’t FTP into the server as root. If I could, I would have put a file in /etc/cron.d with these contents:

* * * * * root /sbin/service iptables stop

Unfortunately, I couldn’t use this method. Luckily I had cpanel and whm installed, and this offers a second way to get out of a locked server if the problem is iptable / port related. You can simply:

  1. Go to your WHM url (usually, www.yoursite.com/whm)
  2. Log in
  3. Modify the url by appending: /scripts2/doautofixer?autofix=iptablesflush (i.e. something like this: www.yoursite.com/scripts2/doautofixer?autofix=iptablesflush)

You should see a message saying the iptables were flushed:

autofixer

 

Print and die, with Laravel

April 15, 2014 at 2:16 pm

laravelFor long time I thought I was the strange programmer that needed something that nobody else could possibly want.

The need arises almost daily for me to see the contents of an object in PHP. XDebug and tracing through code is convenient but often overkill. Sometimes you just want to be able to:

    print '<pre>';
    print_r($someObject);
    die();

Sure, you might think that “var_dump” is the solution to this, but “var_dump” just solves one part of the problem, namely the printing part. So far many projects I would create my own method, called “p”. It would often do the trick:

    function p($object) {
        var_dump($someObject);
        die();
    }

Which I could then call:

    p($object)

It wasn’t until Laravel that I’ve come across a built-in way to get this done quickly and without adding any extra fuzz.

    dd($object)

You can read more about the “dd” function here.

And FYI, Laravel rocks! I’ll be posting more about it in the weeks to come. I’m still learning, but so far it kicks beats Zend and Yii by a long mile.

Free WiFi Hotspots in Cape Town

March 19, 2014 at 10:39 am

free-capetown-wifi-hotspotsA friend showed me this digital bundle of joy just a few moments ago. See a map with a complete list of free WiFi hotspots in Cape Town. Check it out here:

https://mapsengine.google.com/map/u/0/edit?mid=zpX-MvdqQIcQ.kxtx-tf5Tu1M

 

Facebook Bought Whatsapp…

February 25, 2014 at 6:05 pm

mademelol

How to install PostGIS for Postgres on Ubuntu?

February 21, 2014 at 9:47 am

From the command line:

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install postgresql-9.1-postgis

And then don’t forget to restart Postgres:

sudo service postgresql restart

Who Facebook Unfriended me?

February 8, 2014 at 7:37 pm

unfriendedmeI was bored and have been wanting to write something to do this for quite some time. So I did. It’s a simple one-pager site that grabs your friends list via the Facebook connect API and compares the list over time. It’s free, easy to use and does exactly as the titles says: tell you who has unfriended you on Facebook.

Check it out here: http://who.fbunfriended.me/

The Best Task Management / Scrum / Kanban Tool out there

February 4, 2014 at 6:32 pm

I’ve tried quite a few tools out there, including: Jira, KanBanTool and many others. Nothing compares to the simplicity and effectiveness of Trello. Check it out:

trello