Scroll to top

How to install latest Nginx on Ubuntu

Nginx Logo

Install latest Nginx on Ubuntu Ubuntu doesn’t always keep up with the latest stable releases of Nginx. To install latest Nginx on Ubuntu I normally follow these steps: Step 1 Add latest stable release distro to Ubuntu sources file in /etc/apt/sources.list. Replace ‘precise’ with your Ubuntu version: echo ‘deb http://nginx.org/packages/ubuntu/ precise nginx’ >> /etc/apt/sources.list Step [...]

Read more

Nginx htpasswd – how to generate one

Nginx Logo

Nginx htpasswd Every time I want to generate Nginx htpasswd I forget how to do it. This is just for my reference so I don’t have to search for a solution on the Internet. Apache comes with htpasswd utility, but I strictly run Nginx these days and don’t really need Apache or any Apache related [...]

Read more

Mysql-bin files too large – solved

Newrelic Disk Space

Newrelic is an application monitoring tool that truly is developer’s best friend. It’s such a true statement.  I’ve used Newrelic to pinpoint and successfully troubleshoot numerous applications.  I’ve recently switched all database tables from MyISAM to InnoDB for a couple of reasons that are outside the scope of this post. What came to my intention is [...]

Read more

WordPress Nginx and APC Configuration

Nginx Logo

I’ve been working with Nginx web server for a while now. I have to say it’s an impressive web server that performs really well on high traffic websites. I’m in the process of migrating all my sites from Apache to Nginx. I am about 80% there after migrating WordPress and Joomla sites to Nginx without [...]

Read more

Delete Revisions in WordPress – HOWTO

WordPress Logo

Delete Revisions in WordPress When you write articles in WordPress, your revisions will periodically get saved in the database. This is a useful feature, however, each revision that is saved by WordPress results in a new record in your MySQL database. I don’t have a problem with having revisions stored in the database for my [...]

Read more

Remove Files From Git History

Remove Files From Git History

Remove Files From Git History Occasionally a developer might commit some sensitive information, such as passwords, in a Git repository. Although you can easily remove the file in question from the repo, Git will retain the commit history for that particular file. Fortunately, in Git there is an easy way to remove files from Git [...]

Read more

Install WordPress in less then a minute

WordPress Logo

Why Install WordPress locally? If you have a WordPress website that is live and don’t have it set up locally on your computer or laptop, you’re doing it wrong. To install WordPress on your local machine is a breeze. Why should you install WordPress on your local machine before running it on production? If you [...]

Read more

Web Proposal Software by Bidsketch

Web Proposal Front Page Sample

I’ve been doing a lot of freelance work lately and one thing I really wanted to improve on was how to write a good Web Development Proposal without spending hours and hours on it. There’s nothing worse than spending hours and sometimes days on writing a proposal, only to see it get rejected. Well my [...]

Read more

WordPress Login / Logout menu link

WordPress logo with a Christmas hat

Almost every site I build requires WordPress login / logout functionality and I haven’t been able to find a standard way of adding a login/logout link to the primary menu of my theme. I wrote this little filter that works like a charm and what I really really like about it is that when user [...]

Read more

How to set up a Website maintenance page

Sample Maintenance Page

Occasionally I need to take my sites down for a regular maintenance and I’ve come up with a pretty neat way of setting up a website maintenance page using Apache mod rewrites. Once the rewrites are in place, you don’t need to restart your Apache webserver for any subsequent maintenance periods.  The idea is to simply drop [...]

Read more

WordPress login widget redirect prevention

WordPress Login Pod

I don’t know if I’ve mentioned this before, but WordPress has become my favourite open source tool ever. There is very little that you can’t do with it. I like how you can hook into almost any core WordPress functionality and last night I had to modify the  wordpress login widget. The problem I solved was [...]

Read more

Basic Auto Scaling configuration on AWS

autoscaling

Auto Scaling The following configuration allows me to sleep at night. It ensures that at least one EC2 instance will be running at any one time.  The Auto Scaling CLI provided by Amazon is a simple tool that’s required for this configuration. To successfully configure auto scaling you need to follow these 2 steps: 1. [...]

Read more

Create AMI image of an EC2 instance store volume

ami

For my reference, these are the steps involved to create an AMI image backup of an Instance Store EC2 volume. 1. Install AMI tools. Might need to uncomment multiverse locations in /etc/apt/sources.list. sudo apt-get install ec2-ami-tools 2. Bundle the volume sudo ec2-bundle-vol -d /tmp -k /mycerts/ec2key.pem –cert /mycerts/cert-xxxxxxxxx.pem -u AWS_ACCOUNT_NUMBER -a -e /tmp -r i386 [...]

Read more

Installing Python MySQLdb on OS X Lion

lion_python

Tonight I tried installing a Python MySQLdb module, but when I ran the setup I got the following error: sh: mysql_config: command not found Traceback (most recent call last): File “setup.py”, line 15, in metadata, options = get_config() File “/Users/markotomic/MySQL-python-1.2.3/setup_posix.py”, line 43, in get_config libs = mysql_config(“libs_r”) File “/Users/markotomic/MySQL-python-1.2.3/setup_posix.py”, line 24, in mysql_config raise EnvironmentError(“%s [...]

Read more

Compile PHP pcntl module on OS X Lion

PHP-logo.svg

I had some trouble compiling pcntl PHP module on OS X Lion so I thought I’d share this solution. In fact, you can use these steps to compile any other PHP module. First download the latest php source from PHP.NET cd into your php src directory, then: cd ext/pcntl phpize ./configure –enable-pcntl When I ran [...]

Read more

MySQL cursors in stored procedures

MySQL Logo

I’ve wanted to write a few stored procedures in MySQL for a while now, but I found it very fiddly and was unable to come up with one very quickly. Tonight I was determined to read up on MySQL documentation and get one going. For my reference only, this stored procedure will loop through a [...]

Read more

Internet Explorer for Mac – IE6, IE7, IE8, IE9, and IE10

internet-explorer-vm-mac

Internet Explorer for Mac Are you looking to install Internet Explorer for Mac? Today I discovered a nice tool on Github which installs free Windows virtual machines using VirtualBox on OS X. The only reason I’d use these virtual machines is to have different versions of Internet Explorer browsers running side by side for testing purposes. So [...]

Read more

opendiff and FileMerge on OS X

FileMerge

Today I discovered opendiff tool that’s native to OS X – provided you have installed the Xcode on your system. It allows you to compare 2 directories and perform actions such as merge-left, merge-right etc… Opendiff simply launches FileMerge OS X utility, which is another one I didn’t know about, and displays differences between 2 [...]

Read more

Bandwidth throttling on OS X

I’ve been using Charles HTTTP Proxy for bandwidth throttling and network monitoring in general. It’s a great little tool, but when it comes to bandwidth throttling, it will only throttle HTTP and HTTPS traffic on ports 80 and 443 respectively. I thought there had to be a way to throttle bandwidth on any port using [...]

Read more

bash script useful tips

At Learnosity I’ve spent last 2 days scripting virtual server deployment on Amazon cloud. For my reference, these are some useful commands I had to use to get the job done. 1. Hash “Hello World” string using SHA256 algorithm echo -n “Hello World” | shasum -a 256 You can also hash a file shasum -a [...]

Read more