May 7 2012

ChangeLog Generator 1.7 Update…

Ben Hoskins

Updated the ChangeLog Generator to 1.7… See http://blog.hozzamedia.com/website-design/applications/changelog-generator/


Apr 3 2012

PHP Cleaning Arrays…

Ben Hoskins

When arrays are built by user input. You can sometimes experience ”blank” values within that array. Sometimes set to “0″, “FALSE” or “NULL”.

You can use array_filter to remove empty (NULL) elements:

$emptyRemoved = array_filter($linksArray);

If you have (int) 0 in your array, you may use the following:

$emptyRemoved = remove_empty($linksArray);

function remove_empty($array) {
 return array_filter($array, '_remove_empty_internal');
 }

function _remove_empty_internal($value) {
 return !empty($value) || $value === 0;
 }

Maybe your elements are not empty per say but contain one or more spaces… You can use the following before using array_filter

$trimmedArray = array_map('trim', $linksArray);

 

Sourced from: http://stackoverflow.com/questions/3654295/remove-empty-array-elements


Mar 24 2012

Encoding,Encryption, and Hashes…

Ben Hoskins

I’ve noticed that there’s a lot of interest out there right now in encryption, and rightfully so. It seems that strong encryption will play an increasingly large role in the future of computer security.
Unfortunately, I’ve also noticed a fair bit of confusion. My goal in this article is to clear that up, and provide a starting point for those of us interested in the field.

Encoding,Encryption, and Hashes.
Although you’ll often see these terms used interchangably, it is important to understand the differences. We’ll begin with the most common, encryption.
Continue reading


Mar 21 2012

ChangeLog Generator…

Ben Hoskins

Been looking into source control and version control software to help manage and organise some of our code. The majority of them don’t seem to fit our workflow and are to restrictive/complicated. I’m a massive fan of the good old ChangeLog (https://http://en.wikipedia.org/wiki/Changelog) which does not scale well with large projects.

So, I’ve built a little “one page” script (technically a few pages if you include images for the GUI). That me and my n3rds use. Nice and simple app to manage a ChangeLog for a large project or site.

Continue reading


Mar 19 2012

Background Images…

Ben Hoskins

Found this amazing site, its got loads of repeating patterns and simply a beautiful webiste. Thought you might be interested…

http://subtlepatterns.com/


Mar 1 2012

PHP Resetting an array…

Ben Hoskins

Just a quick tip, you can easily reset an array with…

array_merge(array(),$array);

Oct 25 2011

Motivation…

Ben Hoskins


Sep 11 2011

Horizontally and Vertically Center a DIV with CSS…

Ben Hoskins

An extremely simple solution to a surprisingly elusive problem. To perfectly center a DIV on an HTML page simply use the following approach.
Continue reading


Sep 6 2011

Ubuntu 11.04 Unity on VMware Fusion

Ben Hoskins

Right, after a lot of unsuccessful googling I came across a solution to the new Linux Ubuntu’s new UI Unity not working in WMware Fusion.

The reason Unity does not work is something to do with the ‘accelerated hardware/graphics’ not being compatible at this moment. And, finally there is a solution to this.

Unity is a 3D UI hence the extra acceleration needed. So.. we can install a 2D version, which from what i understand is completely the same (just without all the whistles and bangs).

First we need to add the 2D repository to our Ubuntu’s software manager. In terminal type:
sudo add-apt-repository ppa:unity-2d-team/unity-2d-daily

Then we need to update Ubuntu’s app cache:
sudo apt-get update

And finally install the new 2D version of Unity:
sudo apt-get install unity-2d-default-settings

Then restart and choose Unity 2D from the Session options at the bottom right when you next login.

Before

During

After


Sep 6 2011

Terminal Boredom…

Ben Hoskins

Just a quick note for boredom and Linux Terminal (I SSH to mine of course):

if($you == BORED) echo 'screw with linux terminal';

I would suggest you try out:

  • Lynx – a terminal website browser
  • cmatrix – terminal matrix thingy
  • greed – a kinda terminal puzzle game
  • moon-buggy – a terminal platform game
  • nethack – a full-on hard core (really need to be a massive n3rd to play it, I only lasted 10mins before I gave up) cave exploration game

To install any of them just use the classic:
sudo apt-get install APP_NAME
*replace APP-NAME with the program you want.