The Blog of Hull based

Web Developer David Carr.

I blog about Web Development and Web Design.

Autoscroll page with jQuery

There are times when it’s really useful for a webpage to scroll up and down automatically. For instance when showing information on a TV screen you may not want to scroll manually. Using jQuery its possible to have the page automatically scroll down at a set speed then scroll back to the top and repeat.

Read more

Github announces unlimited private repositories

Today Github has announced private repo’s are now unlimited for upgraded accounts, for organisations the starter package was 10 private repos for $25 a month, this has been upgraded to $9 a month after the first 5 users still at $25 a month but with unlimited repo’s.

Personal accounts also have unlimited repo’s but $7 a month, whilst there are services like bitbucket that offer free private repo’s I’ve never taken to them in the same way I do with Github. Personally I prefer the Github so this is really good news!

Read more

Bash loop through files and FTP them

I have a folder of csv files that need uploading to a server I don’t want to do it manually, Bash can handle this task perfectly.

This script will connect to an FTP server then loop through the csv files or any type specified and upload them. You cannot do a loop whilst inside of heredoc block like most examples do, instead the commands are written to a txt file.

Read more

Nova 3.0 released

I’m really happy to announce version 3.0 has been released of Nova Framework, (Nova is the new name, replacing Simple MVC Framework). The main focus of 3.0 was to place files above the document root.

This meant restructering the folders and there paths, normally assets such as css, js files and images are placed in the public folder so they can be ran normally, we went futher and placed everything except .htaccess and index.php above the root including all images, css and js files!.

This change results in a lot of other changes, documented in the docs and will be covered in future screencasts, here is the overall summary of the changes:

Read more

How to Set up PHP Statistics

Sometimes you need to make improvements to your code and make things more efficient. Using some simple PHP Statistics can help you identify areas which need improving. These snippets offer useful insight into how efficiently your application is running.

So, for our first snippet we will look at script execution time. This will tell us how long it took the server to process and execute our PHP script. This is one of the most useful snippets. It would also be very useful for benchmarking PHP 5.6 versus 7.0.

Read more

HTML 5 Submit form - multiple actions with formaction

When working with forms there are often times it would be really handy to be able to submit the form and depending on the button clicked changed the form action the data is posted to. Normally this has not been possible so we find workarounds.

I recently found the need for this again and come across a HTML attribute called formaction which is amazing for this! This attribute allows you to specify the url to post to which when pressed will override the form action attribute.

Read more

Website deployment with Bitbucket and FTPloy

Bitbucket is great for private repo’s. Bitbucket provides Git and Mercurial hosting for teams. The free package provides unlimited private and public repo’s. Using Git to keep track of code changes is great, especially when working with a team.

I’ve recently been thinking it would be great when committing code for it to automatically be copied on to the server, here is where FTPloy comes in!

Read more

PHP 7 has been released!

PHP 7 was officially released yesterday! it’s been in testing for quite some time. 8 release candidates were released to find any bugs and fix them now that’s been completed it’s now available for everyone to download and use.

I’m incredibly excited to take advantage of the speed improvements, hopefully most hosts will have this available very soon!

I want to say a massive congratulations and thank you to the PHP team and the contributors this is an amazing effort on their part!

Read more