zMastaa.com

A geek at home. A web and mobile Apps Developer at Bella Design in Cheshire. A man united fan all day long.

Laptop charger not recognised and won’t charge fix

April 20th, 2015

If you own a Dell laptop at some point in its life time you are almost certainly going to fine across charging issues. I say Dell because this is from personal experience only but I do have friends with other brands that have similar or more or less identical power issues after 2 or 3 years.

 

My Dell XPS 12 hybrid is a great laptop and I’ve loved it since the day I unboxed it, I prepared myself however for the inevitable death of the charger by purchasing a 2nd one at the same time. This precautionary measure may have been a little premature as it has taken a full 1 year and 8 months to finally die.

What are the actual benefits of raving?

April 7th, 2015

None.
Don’t get me wrong, I go clubbing and I am one to bask in the hype of raving (see my instagram or snapchats). But let’s be honest here the actual benefits apart from the obvious goal of meeting someone for a night of pleasure, the whole process is merely to remind people that you’re still alive. You could spin it and say its an epic social networking event, but I’ve personally never heard of such stories and should only really make sense if you’re student looking to meet new people.

I’m beginning to reach that stage where I’m more interested in having socials at a bar, even a bar that eventually turns into a club scene, meaning leaving at 12-1am wont feel so early.

However, I’m not completely there yet, I’m still enjoying the hype. I’m just putting my thoughts in writing while I eat at Chunkz. I’m finished.

image

Running wordpress cron jobs on a linux server

February 19th, 2015

I was having an issue with a site that required a database intensive update 4 times a day, we are talking 1000s of  mysql rows updated/deleted/inserted each time. It seemed to be getting by nicely on a test server using wordpress simple cron scheduler. Going live however was a different story, epic failures and error 500s on the clients live website.

Instead of running the script as a hook/function on wordpress I ran it instead using the servers direct crontab, problem solved.The simplest way to get your wordpress functions into an external PHP script is by calling the wp-blog-header.php script as follows

Remember on your linux server use type -a php to find your php interpreter location

You should get something along the lines of

Then at the top of your actual PHP script you’re going to run make sure you add the following line

 

You may encounter an issue with running your script on the server if your file is not formated correctly and the server complains about not being able to find your PHP interpreter

Simply open your script using VIM and do the following

Your file should now run as any normal PHP file would on a wordpress setup